| Agenda 2007 |c\n|>|>|>|>|>|>| !January |!|>|>|>|>|>|>| !February |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n| 1 | 2 | 3 | 4 | 5 |bgcolor(#DEDEAD): 6 |bgcolor(#DEDEAD): 7 |!|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |bgcolor(#DEDEAD): 4 |\n| 8 | 9 | 10 | 11 | 12 |bgcolor(#DEDEAD): 13 |bgcolor(#DEDEAD): 14 |!| 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |bgcolor(#DEDEAD): 11 |\n| 15 | 16 | 17 | 18 | 19 |bgcolor(#DEDEAD): 20 |bgcolor(#DEDEAD): 21 |!| 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |bgcolor(#DEDEAD): 18 |\n| 22 | 23 | 24 | 25 | 26 |bgcolor(#DEDEAD): 27 |bgcolor(#DEDEAD): 28 |!| 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |bgcolor(#DEDEAD): 25 |\n| 29 | 30 | 31 |>|>|>|!|!| 26 | 27 | 28 |>|>|>|!|\n|>|>|>|>|>|>| !March |!|>|>|>|>|>|>| !April |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |bgcolor(#DEDEAD): 4 |!|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |\n| 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |bgcolor(#DEDEAD): 11 |!| 2 | 3 | 4 | 5 | 6 |bgcolor(#DEDEAD): 7 |bgcolor(#DEDEAD): 8 |\n| 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |bgcolor(#DEDEAD): 18 |!| 9 | 10 | 11 | 12 | 13 |bgcolor(#DEDEAD): 14 |bgcolor(#DEDEAD): 15 |\n| 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |bgcolor(#DEDEAD): 25 |!| 16 | 17 | 18 | 19 | 20 |bgcolor(#DEDEAD): 21 |bgcolor(#DEDEAD): 22 |\n| 26 | 27 | 28 | 29 | 30 |bgcolor(#DEDEAD): 31 |!|!| 23 | 24 | 25 | 26 | 27 |bgcolor(#DEDEAD): 28 |bgcolor(#DEDEAD): 29 |\n|>|>|>|>|>|>|>|!|!| 30 |>|>|>|>|>|!|\n|>|>|>|>|>|>| !May |!|>|>|>|>|>|>| !June |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n|!| 1 | 2 | 3 | 4 |bgcolor(#DEDEAD): 5 |bgcolor(#DEDEAD): 6 |!|>|>|>|!| 1 |bgcolor(#DEDEAD): 2 |bgcolor(#DEDEAD): 3 |\n| 7 | 8 | 9 | 10 | 11 |bgcolor(#DEDEAD): 12 |bgcolor(#DEDEAD): 13 |!| 4 | 5 | 6 | 7 | 8 |bgcolor(#DEDEAD): 9 |bgcolor(#DEDEAD): 10 |\n| 14 | 15 | 16 | 17 | 18 |bgcolor(#DEDEAD): 19 |bgcolor(#DEDEAD): 20 |!| 11 | 12 | 13 | 14 | 15 |bgcolor(#DEDEAD): 16 |bgcolor(#DEDEAD): 17 |\n| 21 | 22 | 23 | 24 | 25 |bgcolor(#DEDEAD): 26 |bgcolor(#DEDEAD): 27 |!| 18 | 19 | 20 | 21 | 22 |bgcolor(#DEDEAD): 23 |bgcolor(#DEDEAD): 24 |\n| 28 | 29 | 30 | 31 |>|>|!|!| 25 | 26 | 27 | 28 | 29 |bgcolor(#DEDEAD): 30 |!|\n|>|>|>|>|>|>| !July |!|>|>|>|>|>|>| !August |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |!|>|!| 1 | 2 | 3 |bgcolor(#DEDEAD): 4 |bgcolor(#DEDEAD): 5 |\n| 2 | 3 | @@color(#FDBD20):4@@ | 5 | 6 |bgcolor(#DEDEAD): 7 |bgcolor(#DEDEAD): 8 |!| 6 | 7 | 8 | 9 | 10 |bgcolor(#DEDEAD): 11 |bgcolor(#DEDEAD): 12 |\n| 9 | 10 | 11 | 12 | 13 |bgcolor(#DEDEAD): 14 |bgcolor(#DEDEAD): 15 |!| 13 | 14 | 15 | 16 | 17 |bgcolor(#DEDEAD): 18 |bgcolor(#DEDEAD): 19 |\n| 16 | 17 | 18 | 19 | 20 |bgcolor(#DEDEAD): 21 |bgcolor(#DEDEAD): 22 |!| 20 | 21 | 22 | 23 | 24 |bgcolor(#DEDEAD): 25 |bgcolor(#DEDEAD): 26 |\n| 23 | 24 | 25 | 26 | 27 |bgcolor(#DEDEAD): 28 |bgcolor(#DEDEAD): 29 |!| 27 | 28 | 29 | 30 | 31 |>|!|\n| 30 | 31 |>|>|>|>|!|!|>|>|>|>|>|>|>|!|\n|>|>|>|>|>|>| !September |!|>|>|>|>|>|>| !October |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n|>|>|>|>|!|bgcolor(#DEDEAD): 1 |bgcolor(#DEDEAD): 2 |!| 1 | 2 | 3 | 4 | 5 |bgcolor(#DEDEAD): 6 |bgcolor(#DEDEAD): 7 |\n| 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |bgcolor(#DEDEAD): 9 |!| 8 | 9 | 10 | 11 | 12 |bgcolor(#DEDEAD): 13 |bgcolor(#DEDEAD): 14 |\n| 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |bgcolor(#DEDEAD): 16 |!| 15 | 16 | 17 | 18 | 19 |bgcolor(#DEDEAD): 20 |bgcolor(#DEDEAD): 21 |\n| 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |bgcolor(#DEDEAD): 23 |!| 22 | 23 | 24 | 25 | 26 |bgcolor(#DEDEAD): 27 |bgcolor(#DEDEAD): 28 |\n| 24 | 25 | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |bgcolor(#DEDEAD): 30 |!| 29 | 30 | 31 |>|>|>|!|\n|>|>|>|>|>|>| !November |!|>|>|>|>|>|>| !December |\n| Mon | Tue | Wed | Thu | Fri | Sat | Sun |!| Mon | Tue | Wed | Thu | Fri | Sat | Sun |\n|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |bgcolor(#DEDEAD): 4 |!|>|>|>|>|!|bgcolor(#DEDEAD): 1 |bgcolor(#DEDEAD): 2 |\n| 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |bgcolor(#DEDEAD): 11 |!| 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |bgcolor(#DEDEAD): 9 |\n| 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |bgcolor(#DEDEAD): 18 |!| 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |bgcolor(#DEDEAD): 16 |\n| 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |bgcolor(#DEDEAD): 25 |!| 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |bgcolor(#DEDEAD): 23 |\n| 26 | 27 | 28 | 29 | 30 |>|!|!| 24 | @@color(#FDBD20):25@@ | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |bgcolor(#DEDEAD): 30 |\n|>|>|>|>|>|>|>|!|!| 31 |>|>|>|>|>|!|
Signal and Image Processing Institute \nDepartment of Electrical Engineering \n[[3740 McClintock Avenue|http://maps.google.com/maps?f=q&hl=en&geocode=&q=3740+McClintock+Ave.+Los+Angeles,+CA&sll=34.019123,-118.286405&sspn=0.01325,0.026994&layer=c&ie=UTF8&ll=34.019915,-118.289248&spn=0.006625,0.009978&z=17&iwloc=addr&om=0&cbll=34.01969,-118.29052]] , EEB#424 \nLos Angeles, California 90089-2564\n(213) 740-6430 (tel) \n(213) 740-4651 (fax) \n\nEmail: hhui [at] usc [dot] edu \n\n<html>\n<iframe width="425" height="240" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/sv?cbp=2,443.5756343526824,,0,-9.457966656143304&amp;cbll=34.01969,-118.29052&amp;panoid=qaKivvaQNSepmGeJhSlaPg&amp;v=1&amp;hl=en&amp;gl=us"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=3740+McClintock+Ave.+Los+Angeles,+CA&amp;sll=38.134557,-113.027344&amp;sspn=46.626885,37.792969&amp;ie=UTF8&amp;ll=34.031963,-118.296146&amp;spn=0.013249,0.026994&amp;z=14&amp;om=0&amp;layer=c&amp;cbll=34.01969,-118.29052&amp;cbp=2,443.5756343526824,,0,-9.457966656143304&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small></html>\n
''Imaging'': \nMagnetic Resonance Imaging and Reconstruction; Digital Image Processing and Computer Vision; Advanced Biomedical Imaging \n\n''Signal Processing'': \nDigital Signal Processing; Signal and System; Advanced Digital Signal Processing; Principles of Pattern Recognition and Artificial Neural Systems; Detection and Estimation Theory; Computational Solution of Optimization Problems; Information Theory and Coding;Statistical Communication Theory; Digital Communication; Advanced Digital Communication; \n\n''Statistics'': \nIntroduction to Mathematical Statistics; Analysis of Variance and Design; Statistical Theory; Multivariable Statistical Analysis; Probability and Mathematical Statistics; Stochastic Process and Queuing Theory;\n\n''Mathematics'':\nNumerical Analysis; Mathematical Analysis; Advanced Algebra; Applied Functional Analysis; Complex Variable Functions; Ordinary Differential Equations; Data Structure; Discrete mathematics\n\n
config.options.chkRegExpSearch = false; // default false\nconfig.options.chkCaseSensitiveSearch = false; // default false\nconfig.options.chkAnimate = false; // default true\nconfig.options.txtUserName = "Hua Brian Hui"; // default "YourName"\nconfig.options.chkSaveBackups = true; // default true\nconfig.options.chkAutoSave = true; // default false\nconfig.options.chkGenerateAnRssFeed = false; // default false\nconfig.options.chkSaveEmptyTemplate = false; // default false\nconfig.options.chkOpenInNewWindow = true; // default true\nconfig.options.chkToggleLinks = false; // default false\nconfig.options.chkHttpReadOnly = true; // default true\nconfig.options.chkForceMinorUpdate = false; // default false\nconfig.options.chkConfirmDelete = true; // default true\nconfig.options.txtBackupFolder = ""; // default ""\nconfig.options.txtMainTab = ""; // default "tabTimeline"\nconfig.options.txtMoreTab = "moreTabAll"; // default "moreTabAll"\nconfig.options.txtMaxEditRows = "30"; // default "30"
[[Home]]
Functional brain imaging include invasive and non-invasive brain imaging. Invasive brain imaging includes Electrocorticography (ECoG), Local Field Potentials (LFP) and Single unit recording. Non-invasive brain imaging includes Electroencephalography (EEG), magnetoencephalography (MEG) and functional magnetic resonance imaging (fMRI) .\n\n/%\nNeed to write it, to say I have used EEG, MEG to ......\n%/\n
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:\n* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)\n* MainMenu: The menu (usually on the left)\n* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened\nYou'll also need to enter your username for signing your edits: <<option txtUserName>>\n\n[[SideBarOptions]]
<<gradient horiz #bbbbbb #eeeeee #ffffff>>The new GradientMacro allows simple horizontal and vertical coloured gradients. They are constructed from coloured HTML elements, and don't require any images to work.>>\nThe GradientMacro is an ExtendedMacro that processes the text after it up until the next '>>' sequence. It looks like this:\n{{{\n<<gradient vert #ffffff #ffdddd #ff8888>>gradient fill>>\n}}}\nThe first parameter can be ''vert'' or ''horiz'' to indicate the direction of the gradient. The following parameters are two or more colours (CSS RGB(r,g,b) format is also acceptable). The GradientMacro constructs a smooth linear gradient between each of the colours in turn.\n\n| <<gradient vert #ffffff #ffdddd #ff8888>>No images were harmed in the making of this gradient fill>> | <<gradient vert #ffffff #ddffdd #88ff88>>No images were harmed in the making of this gradient fill>> | <<gradient vert #ffffff #ddddff #8888ff>>No images were harmed in the making of this gradient fill>> |\n\nInline CSS definitions can be added to gradient filles like this:\n\n<<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>>\n{{{\n<<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>>\n}}}\n
/***\n| Name:|HideWhenPlugin|\n| Description:|Allows conditional inclusion/exclusion in templates|\n| Version:|1.0.2|\n| Date:|19-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#HideWhenMacro|\n| Author:|Simon Baird <simon.baird@gmail.com>|\nFor use in ViewTemplate and EditTemplate. Eg\n{{{<div macro="showWhen tiddler.tags.contains('Task')">[[TaskToolbar]]</div>}}}\n{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}\n***/\n//{{{\nmerge(config.macros,{\n hideWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n if (eval(paramString)) {\n removeChildren(place);\n place.parentNode.removeChild(place);\n }\n }},\n showWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n config.macros.hideWhen.handler(place,macroName,params,wikifier,'!('+paramString+')',tiddler);\n }}\n});\n//}}}
Coming soon...
[>img[Me|images/me.jpg]]\n''Hua Brian Hui''\n\nResearch Assistant, ~PhD student\n[[Biomedical Imaging Research Lab|http://neuroimage.usc.edu/]]\nSignal & Image Processing Institute\n[[Department of Electrical Engineering |http://ee.usc.edu]]\n[[University of Southern California|http://www.usc.edu]]\n\nHello. I am Brian, a fourth-year PhD student at the Signal and Image Processing Institute of the [[Electrical Engineering department|http://ee.usc.edu/]] in the University of Southern California (USC). I also work as a research assistant in the Biomedical Imaging Research Lab, led by [[Prof. Richard M. Leahy|http://ee.usc.edu/faculty_staff/faculty_directory/leahy.htm]].\n\n[[Contact me]]\n
<html>\n<br><br>\n<table border=0"><tr>\n <td width="427"><a href="http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=79" TARGET="_blank">IEEE Signal Processing Magazine</a></td>\n <td width="40"><a href="http://ieeexplore.ieee.org/rss/TOC79.XML" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td> <a href="http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=78" TARGET="_blank" >IEEE Transactions on Signal Processing</a></td>\n <td><a href="http://ieeexplore.ieee.org/rss/TOC78.XML" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n\n </tr>\n <tr>\n <td> <a href="http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=51" TARGET="_blank" >IEEE Engineering in Medicine and Biology Magazine</a></td>\n <td><a href="http://ieeexplore.ieee.org/rss/TOC51.XML" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td> <a href="http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=42" TARGET="_blank" >IEEE Transactions on Medical Imaging</a></td>\n\n <td><a href="http://ieeexplore.ieee.org/rss/TOC42.XML" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td> <a href="http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=10" TARGET="_blank" >IEEE Transactions on Biomedical Engineering</a></td>\n <td><a href="http://ieeexplore.ieee.org/rss/TOC10.XML" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td>&nbsp;</td>\n\n <td>&nbsp;</td>\n </tr><tr>\n <td><a href="http://www.sciencedirect.com/science/journal/10538119" TARGET="_blank" >NeuroImage</a></td>\n <td><a href="http://barf.jcowboy.org/neuroimage.xml"><img src="images/rss_button.jpg" border="0" height="16" width="28" TARGET="_blank" ></a></td>\n </tr>\n <tr>\n <td> <a href="http://www3.interscience.wiley.com/cgi-bin/jtoc?ID=38751" TARGET="_blank" >Human Brain Mapping</a> </td>\n\n <td>&nbsp;</td>\n </tr>\n <tr>\n <td>&nbsp;</td>\n <td>&nbsp;</td>\n </tr>\n <tr>\n <td><a href="http://www.nature.com/nature/index.html" TARGET="_blank" >Nature</a> <a href="http://www.nature.com/nature/journal/vaop/ncurrent/index.html" TARGET="_blank" > </a><a href="http://www.nature.com/nature/journal/vaop/ncurrent/index.html" TARGET="_blank" >(AOP - Advance online publication)</a></td>\n\n <td><a href="http://www.nature.com/nature/current_issue/rss" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td><a href="http://www.nature.com/nrn/index.html" TARGET="_blank" >Nature Reviews Neuroscience</a></td>\n <td><a href="http://www.nature.com/nrn/current_issue/rss" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n \n <tr>\n <td><a href="http://www.sciencemag.org/" TARGET="_blank" >Science</a></td>\n\n <td><a href="http://www.sciencemag.org/rss/current.xml" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr><tr>\n <td><a href="http://www.pnas.org/" TARGET="_blank" >PNAS</a></td>\n <td><a href="http://barf.jcowboy.org/pnas.xml" TARGET="_blank" ><img src="images/rss_button.jpg" border="0" height="16" width="28"></a></td>\n </tr>\n <tr>\n <td>&nbsp;</td>\n <td>&nbsp;</td>\n\n </tr>\n <tr>\n <td><a href="http://www3.interscience.wiley.com/cgi-bin/jhome/10005199" TARGET="_blank" > Journal of Magnetic Resonance Imaging </a></td>\n <td>&nbsp;</td>\n </tr>\n <tr>\n <td><a href="http://www.sciencedirect.com/science/journal/0730725X" TARGET="_blank" > Magnetic Resonance Imaging </a></td>\n\n <td>&nbsp;</td>\n </tr>\n <tr>\n <td><a href="http://www3.interscience.wiley.com/cgi-bin/jtoc?ID=10005196" TARGET="_blank" > Magnetic Resonance in Medicine </a></td>\n <td>&nbsp;</td>\n </tr>\n </table>\n</html>\n
/***\n|''Name:''|LegacyStrikeThroughPlugin|\n|''Description:''|Support for legacy (pre 2.1) strike through formatting|\n|''Version:''|1.0.1|\n|''Date:''|Jul 21, 2006|\n|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|\n|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|\n|''License:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n\n***/\n\n//{{{\n\n// Ensure that the LegacyStrikeThrough Plugin is only installed once.\nif(!version.extensions.LegacyStrikeThroughPlugin)\n {\n version.extensions.LegacyStrikeThroughPlugin = true;\n\nconfig.formatters.push(\n{\n name: "legacyStrikeByChar",\n match: "==",\n termRegExp: /(==)/mg,\n element: "strike",\n handler: config.formatterHelpers.createElementAndWikify\n});\n\n} // end of "install only once"\n//}}}\n
[[Home]]\n----\n[[Research Interests]]\n[[Projects]]\n[[Publications]]\n----\n[[Courses]]\n[[Teaching]]\n----\n[[Research Resources]]\n[[Personal Interest]]\n[[Photos]]\n----\n[[Contact me]]\n
<!--{{{-->\n<div class='header'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n\n<div macro="showWhen readOnly">\n<!-- cut-down toolbar for web users -->\n</div>\n<div macro="hideWhen readOnly">\n<!-- regular toolbar for me -->\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n\n\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>\n<!--}}}-->
Type the text for 'Personal'
*[[Travel]]\n//{{{\n A journey of a thousand miles begins with single step. -Lao-tzu\n//}}}\n\n
Brain of Brian\n[img[MRI|images/MRI.jpg]]\n\nMore photos are coming soon...
!!''Current Projects''\n* Functional interaction network analysis using intracranial EEG \n* Suppressing signal interference in EEG/MEG inverse imaging method using nulling beamformer \n* MEG data denoising using generalized sidelobe cancelers\n* Analyzing resting-state neural network using MEG\n\n\n\n!!''Previous Projects''\n* Automatic vehicle license plate recognition system (09/00-03/02) \n* Intelligent traffic surveillance system (03/02-05/02)\n* An automatic image segment toolbox for image processing software (03/2002-07/2002)\n\n!!''Selected Course Projects''\n* Influence of bimanual movements on the functional motor network for a continuous finger tapping task (//Psychology 555 - Functional Magnetic Resonance Imaging class//) >>> [[presentation|./projects/fMRI_project.pdf]] \n* Imaging and Image Processing in Fluorescence Microscopy: A Survey (Pharmaceutical Sciences 599 - Biomedical Imaging: Molecules to Man) >>> [[report|./projects/Fluorescense_report.pdf]] [[presentation|./projects/Fluorescense.pdf]] \n* Comparison of Transient Response Reduction Methods in balanced SSFP (EE 591 - Magnetic Resonance Imaging and Reconstruction) >>> [[report|./projects/MRI/SSFP_Hua.pdf]] [[Code|./projects/MRI/MRIcode.zip]] \n* Comparison and analysis of different pattern classifiers (~EE559 - Mathematical Pattern Recognition)\n* Automatic Spike Detection using Wavelet Analysis in Epilepsy MEG Recording' (EE 596 Wavelet) >>> [[report|./projects/wavelet.pdf]] \n* GUI based Computed Tomography Simulator (~BME525 – Advanced Medical Imaging)>>> [[detail|./projects/CT/ct.html]] [[Snapshot|./projects/CT/snapshot.jpg]] [[Code|./projects/CT/CTcode.zip]] \n
*"//''Identifying True Cortical Interactions in MEG using the Nulling Beamformer''//", ''Hua Brian Hui'', Dimitrios Pantazis, Steven L. Bressler, Richard M. Leahy, NeuroImage, submitted \n\n*"//''Generalized Sidelobe Canceller For Magnetoencephalography Arrays''//", John C. Mosher, Matti S. HƤmƤlƤinen, Dimitrios Pantazis, ''Hua Brian Hui'', Richard C. Burgess, Richard M. Leahy, Biomedical Imaging: Macro to Nano, 2009, Boston, MA, USA\n\n* "//''Long range high-gamma (60-90 Hz) coupling between primary motor cortex and SMA during motor control revealed by MEG source imaging ''//",, K. Jerbi, ''H. Hui'', D. Pantazis, J-P. Lachaux, O. Bertrand, L. Garnero, RM. Leahy, S. Baillet,June 2009, HBM 2009, 15th Annual Meeting of the Organization for Human Brain Mapping, San Francisco, CA, USA \n\n* "//''Long distance high-gamma synchronization between primary motor cortex and SMA during motor control revealed by MEG source imaging ''//", K. Jerbi, D. Pantazis, ''H. Hui'', JP. Lachaux, O. Bertrand, L. Garnero, R. M. Leahy & S. Baillet, Proc. of the 16th International Conference on Biomagnetism, BIOMAG 2008, Sapporo, Japan, August 25th-29th, 2008.\n\n*"//''Linearly constrained MEG beamformers for MVAR modeling of cortical interactions''//", ''H.Hui'', R.M Leahy, Biomedical Imaging: Macro to Nano, 2006. 3rd IEEE International Symposium on , vol., no.pp. 237- 240, 6-9 April 2006 ([[pdf|http://biron.usc.edu/~hhui/file/ISBI2006.pdf]]) \n\n*"//Linearly Constrained MEG Beamformers for Modeling Cortical Interactions //", ''Hua Brian Hui,'' Richard M. Leahy, Biomag 2006 - 15th International Conference on Biomagnetism, Vancouver BC, Canada.\n\n*"//Linear and nonlinear directional interaction measures applied to paced and self-paced finger movements: an MEG study//", Darvas, F., ''Hui, B.'', Dale, C. L., Simpson, G. V., Leahy, R. M. Biomag 2006 - 15th International Conference on Biomagnetism, Vancouver BC, Canada.\n\n*"//A novel computer vision system for intelligent traffic management//", ''Hui Hua,'' Ye Xiuqing, Cheng Yujuan, Li Hongdong, ICYCS' 2001(The Sixth International Conference for Young Computer Scientists) \n\n*"//Adaptive Moving Vehicle Detection - a intelligent traffic system based on computer vision system//", ''Hui Hua'', Ye Xiuqing, Li Hongdong, Zhou Feng CSCAS2001(The 16th China Symposium on Circuits and Systems) (in Chinese) \n\n
My research interests include signal and image processing, statistical analysis, computer vision and machine learning, with their applications to biomedical signals and functional brain imaging.\n*Statistical signal processing \n*Network analysis and graph theory\n*Time series analysis\n*Pattern recognition and machine learning\n*Image analysis and computer vision\n*Medical image reconstruction, image registration (MRI,CT, PET)\n\n/%\nElectroencephalography (EEG), Electrocorticography (ECoG), magnetoencephalography (MEG) and functional magnetic resonance imaging (fMRI) \n%/\n
*[[Journal in medical imaging]]\n\n*[[Functional brain imaging]]\n\n*[[Research links]]
<html>\n<h3></h3>\n<h3>MEG/EEG</h3>\n<ul>\n <li><a href="http://neuroimage.usc.edu">Neuroimage Group USC </a></li>\n <li><a href="http://www.nmr.mgh.harvard.edu/martinos/flashHome.php">MGH Biomedical Imaing </a></li> \n<li><a href="http://www.elekta.com/healthcare_international_elekta_neuromag.php">Elekta Neuromag</a></li>\n <li><a href="http://www.4dneuroimaging.com/">4D Neuroimaging</a></li>\n</ul>\n<h3>Brain Imaging Software </h3>\n<ul>\n <li><a href="http://neuroimage.usc.edu/brainstorm/">Brainstorm</a></li>\n <li><a href="http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php" >MNE</a></li> \n <li><a href="http://www.sccn.ucsd.edu/eeglab/">EEGLAB</a>\n</li> \n<li><a href="http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip&DokuWiki=70b36d0c278e4923965fac7767d726f0">FieldTrip</a></li>\n <li><a href="http://www.besa.de/index_home.htm">BESA</a></li>\n <li><a href="http://www.neuroscan.com/curry5.cfm">Curry</a></li> \n----\n <li><a href="http://brainsuite.usc.edu/">BrainSuite</a></li>\n<li><a href="http://surfer.nmr.mgh.harvard.edu/">Freesurfer</a></li>\n----\n<li><a href="http://www.fil.ion.ucl.ac.uk/spm/">SPM</a></li>\n<li><a href="http://www.fmrib.ox.ac.uk/fsl/index.html">FSL</a></li>\n<li><a href="http://www.brainvoyager.com/">BrainVoyager</a></li>\n</ul>\n<h3>Signal Processing Links </h3>\n<ul>\n <li><a href="http://spib.rice.edu/spib.html">SPIB (Signal Processing Information Base) </a></li>\n <li><a href="http://www.dspguru.com/"></a><a href="http://www.yahoo.com/Science/Engineering/Electrical_Engineering/Signal_and_Image_Processing/">Yahoo - Signal and Image Processing </a></li>\n</ul>\n<h3>Math Links </h3>\n<ul>\n <li><a href="http://www.mathtools.net">Mathtools.net </a></li>\n <li><a href="http://www.mathematicsweb.org">Mathematics Web </a></li>\n <li><a href="http://mathforum.org/library/problems/">Math Forum Problem Libary </a></li>\n <li><a href="http://www.ams.org/online_bks/onbk_list.html"> ASM Books Online </a></li>\n <li><a href="http://www.mathworks.com/">The MathWorks Web Site </a></li>\n <li><a href="http://www.math.fsu.edu/Science/math.html"> Mathematics WWW Virtual Library </a></li>\n</ul>\n<h3>LaTex </h3>\n<ul>\n <li><a href="http://www.giss.nasa.gov/latex/">Hypertext Help with LaTeX </a></li>\n <li><a href="http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/">Text Processing using LaTeX </a></li>\n <li><a href="http://www.loria.fr/tex/english/general.html"> General documentation about (La)TeX </a></li>\n <li><a href="http://www.winedt.com/">WinEdt </a> (Windows text editor for LaTeX documents) </li>\n</ul>\n<h3>Do Research </h3>\n<ul>\n <li><a href="http://www.ece.rice.edu/%7Erichb/resources.html"> Research Resources </a></li>\n <li><a href="http://citeseer.nj.nec.com/cs">CiteSeer NEC </a></li>\n</ul>\n\n<h3>IEEE </h3>\n<ul>\n <li><a href="http://www.ieee.org/">IEEE Home Page </a></li>\n <li><a href="http://www.ieee.org/society/sp/index.html">IEEE Signal Processing Society </a></li>\n <li><a href="http://www.ieee.org/membership/students/index.html"> IEEE Student </a></li>\n</ul>\n\n<h3>MRI Links </h3>\n<ul>\n <li><a href="http://www.sunnybrook.utoronto.ca:8080/%7Egawright/menu_mr_nf.html">An Introduction to MRI </a></li>\n <li><a href="http://www.cis.rit.edu/htbooks/mri/">The Basics of MRI </a> Joseph P. Hornak, PhD <br>\n </li>\n</ul>\n\n</html>\n
[[Amazon|http://www.amazon.com]]
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>>\n<<slider chkSliderOptionsPanel OptionsPanel 'options->' 'Change TiddlyWiki advanced options'>>GettingStarted
Hua Brian Hui
/*{{{*/\n\nbody {\n //background-color: white;\n font-size: 9pt;\n font-family: verdana,arial,helvetica;\n //margin: 0em 0em 0em 0em;\n padding: 0em 0em 0em 0em;\n}\n\n\n\n#mainMenu {\n width: 10.3em;\n line-height: 166%;\n padding: 0em 0.5em 0.5em 0.5em;\n font-size: 10pt; \n font-weight: bold;\n color: black;\n text-align: left;\n background-color: #e5e5c9;\n margin: 0.5em 0.5em 0.5em 0.3em;\n border: 1px solid black;\n border-right-width: 2px;\n border-bottom-width: 2px;\n}\n\n#mainMenu a {\n //color: #330000;\n font-weight: bold;\n}\n\n#mainMenu a:hover {\n //background-color: #330000;\n color: white;\n}\n\n.header {\n height: 100px;\n background: url("rinback.jpg") repeat-x bottom left;\n position: relative; \nfont-weight: bold;\n}\n\n.headerShadow {\n position: relative;\n padding: 2.5em 0em 0em 1em;\n left: -2px;\n top: -2px;\n}\n\n.headerForeground {\n position: absolute;\n padding: 2.5em 0em 0em 1em;\n left: 0px;\n top: 0px;\n}\n\n.titleLine {\n padding: 0.5em 1em 0.3em 1em;\n}\n\n.tiddler {\n padding: 0em 1em 1em 1em;\n margin-bottom: 0em;\n}\n\n.innerTiddler {\n padding: 1em 1em 1em 1em;\n font-size: 9pt;\n}\n\n.tiddlerSelected {\n background-color: #ffffef;\n margin-bottom: 0em;\n border: solid silver 1px;\n}\n.subtitle {\n display: none;\n}\n\n\n/*}}}*/\n
''Teaching Experiences'':\n\n*Instructor, graduate course EE599: Mapping Structure and Function in the Human Brain (4 lectures), USC (2009)\n<<<\nLectured, led discussion sessions, prepared class notes and grading\n<<<\n*Teaching Assistant, EE201: Introduction to Digital Circuits Lab, USC (2004~2005)\n<<<\nLectured and led lab sessions; responsible for lab preparation, teaching, evaluation and grading\n<<<\n*Teaching Assistant, ECE367: Microprocessor Based Design, ECE225: Circuit Analysis, and ECE210: Electrical Circuit Analysis, UIC(2003~2004)\n<<<\nLectured and led lab sessions; responsible for lab preparation, teaching, evaluation and grading\n<<<\n*Teaching Assistant in ECE341: Communications and Signal Processing *(2003)\n<<<\nResponsible for evaluation and grading\n<<<\n*I have supported myself financially by working as a private tutor when I was in undergraduate. I have tutored college students and high school students from different grades with various subjects.\n\n
<html>\n<h2 class="title">Map</h2>\n <ul>\n <ul>\n <li><a href="http://maps.google.com/" target="_blank" onmouseover="window.status='http://www.travelocity.com';return true;" onmouseout="window.status=' ';return true;">Google Map</a></li>\n <li><a href="http://maps.yahoo.com/">Yahoo Map <img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=88046.10000003&amp;type=3&amp;subid=0" border="0" height="1" width="1"> </a></li>\n <li><img src="http://service.bfast.com/bfast/serve?bfmid=26917872&amp;siteid=41599600&amp;bfpage=homepage" nosave="" border="0" height="1" width="1"><a href="http://www.mapquest.com" target="_top">Mapquest</a> </li>\n\n </ul>\n </ul>\n <h2 class="title">Ticket &amp; Hotel Booking</h2>\n\n <ul>\n <li><a href="http://www.tkqlhce.com/d074y1A719PRZTURXQPRQTZVRVZ" target="_blank" onmouseover="window.status='http://www.travelocity.com';return true;" onmouseout="window.status=' ';return true;">Travelocity.com</a><img src="http://www.lduhtrp.net/6o65p59y31NPXRSPVONPORXTPTX" border="0" height="1" width="1"> \n </li>\n\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=88046.10000003&amp;type=3&amp;subid=0" target="new" onmouseover="window.status='http://www.lastminutetravel.com';return true;" onmouseout="window.status=' ';return true;">LastMinuteTravel.com</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=88046.10000003&amp;type=3&amp;subid=0" border="0" height="1" width="1"> \n </li>\n <li><img src="http://service.bfast.com/bfast/serve?bfmid=26917872&amp;siteid=41599600&amp;bfpage=homepage" nosave="" border="0" height="1" width="1"><a href="http://service.bfast.com/bfast/click?bfmid=26917872&amp;siteid=41599600&amp;bfpage=homepage" target="_top" onmouseover="window.status='http://www.expedia.com';return true;" onmouseout="window.status=' ';return true;">Expedia.com</a> \n </li>\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=20386.10000008&amp;type=3&amp;subid=0" target="new">Site59</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=20386.10000008&amp;type=3&amp;subid=0" border="0" height="1" width="1"> \n </li>\n <li><a href="http://www.orbitz.com/">Orbitz.com</a> \n </li>\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=100094.10000004&amp;type=3&amp;subid=0">Cheap&nbsp;Flights</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=100094.10000004&amp;type=3&amp;subid=0" height="1" width="1"> \n </li>\n\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=55640.10000021&amp;type=3&amp;subid=0">Discountfares.com</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=55640.10000021&amp;type=3&amp;subid=0" border="0" height="1" width="1"> </li>\n </ul><ul>\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=93322.10002914&amp;type=3&amp;subid=0">Hotwire.com</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=93322.10002914&amp;type=3&amp;subid=0" height="1" width="1"> \n </li>\n <li><a href="http://www.priceline.com/">Priceline.com</a></li></ul>\n <ul>\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=100094.10000003&amp;type=3&amp;subid=0">Discount&nbsp;Hotels</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=100094.10000003&amp;type=3&amp;subid=0" height="1" width="1"> \n </li>\n\n <li><a href="http://click.linksynergy.com/fs-bin/click?id=LnvtyiL9Kv4&amp;offerid=91951.10000004&amp;type=3&amp;subid=0">CountryInns.com</a><img style="visibility: hidden ! important;" src="http://ad.linksynergy.com/fs-bin/show?id=LnvtyiL9Kv4&amp;bids=91951.10000004&amp;type=3&amp;subid=0" border="0" height="1" width="1"> \n </li>\n <li><a href="http://www.jdoqocy.com/oe101ft1zt0GIQKLIOHGIHKPIOQP" target="_blank" onmouseover="window.status='http://www.choicehotels.com';return true;" onmouseout="window.status=' ';return true;">Choice HotelsĀ® </a><img src="http://www.afcyhf.com/ph121o26v0zKMUOPMSLKMLOTMSUT" border="0" height="1" width="1"> \n </li>\n <li><a href="http://www.jdoqocy.com/e5103mu2-u1HJRLMJPIHNJLKKJ" target="_blank" onmouseover="window.status='http://www.hoteldiscounts.net';return true;" onmouseout="window.status=' ';return true;">HotelDiscounts.net</a><img src="http://www.ftjcfx.com/j4116uuymsqBDLFGDJCBHDFEED" border="0" height="1" width="1"> \n </li>\n <li><a href="http://www.tkqlhce.com/1c74gv30v2IKSMNKQJIKJMSKJOQ" target="_blank" onmouseover="window.status='http://www.HotelPlanner.com';return true;" onmouseout="window.status=' ';return true;">HotelPlanner.com</a><img src="http://www.afcyhf.com/81103nswkqo9BJDEBHA9BADJBAFH" border="0" height="1" width="1"> \n </li>\n <li><a href="http://www.Hotel.com" target="_self">Hotel.com</a>\n</html>\n
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n| 21/3/2007 14:23:56 | Hua Brian Hui | [[index.html|file:///F:/Work/My%20Web/test/index.html]] | [[store.php|http://biron.usc.edu/~hhui/store.php]] | | index.html | |
<!--{{{-->\n<div macro="showWhen readOnly">\n<!-- cut-down toolbar for web users -->\n<div class='toolbar' macro='toolbar closeTiddler permalink'></div>\n</div>\n<div macro="hideWhen readOnly">\n<!-- regular toolbar for me -->\n<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler permalink references jump'></div>\n</div>\n\n<div class='title' macro='view title'></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>\n<!--}}}-->
/***\n|''Name:''|WikiBar|\n|''Version:''|2.0.0 beta3|\n|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|\n|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|\n|''Type:''|toolbar macro command extension|\n|''Required:''|TiddlyWiki 2.0.0 beta6|\n!Description\nWikiBar is a toolbar that gives access to most of TiddlyWiki's formatting features with a few clicks. It's a handy tool for people who are not familiar with TiddlyWiki syntax.\nBesides, with WikiBar-addons, users can extend the power of WikiBar.\n!Support browser\n*Firefox 1.5\n!Revision history\n*v2.0.0 beta3 (2005/12/30)\n** remove macros (replaced by TWMacro addon)\n** add wikibar command in toolbar automatically\n** rename DOIT to HANDLER\n** rename TIP to TOOLTIP\n*v2.0.0 beta2 (2005/12/21)\n** re-design Wikibar addon framework\n*v2.0.0 beta1 (2005/12/14)\n** Note:\n*** WikiBarPlugin is renamed to WikiBar\n** New Features:\n*** support TiddlyWiki 2.0.0 template mechanism\n*** new wikibar data structure\n*** new wikibar-addon framework for developers\n**** support dynamic popup menu generator\n*** support most new macros added in TiddlyWiki 2.0.0\n*** multi-level popup menu\n*** fix wikibar tab stop\n*** remove paletteSelector\n** Known Bugs:\n*** popup-menu and color-picker can't be closed correctly\n*** some macros can't be displayed correctly in previewer\n*** text in previewer will be displayed italic\n*v1.2.0 (2005/11/21)\n**New Features:\n***User defined color palettes supported\n####Get color palettes from [[ColorZilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]].\n####Save the palette file(*.gpl) as a new tiddler and tag it with 'ColorPalettes', then you can use it in WikiBar.\n***WikiBar style sheet supported\n***Click on document to close current colorPicker, paletteSelector or aboutWikibar\n*v1.1.1 (2005/11/03)\n**Bugs fixed:\n***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'\n*v1.1.0 (2005/11/01)\n**Bugs fixed:\n***WikiBar overruns (reported by by GeoffS <gslocock@yahoo.co.uk>)\n**New features:\n***Insert a color code at the cursor. (Thanks to RunningUtes <RunningUtes@gmail.com>)\n***Enable gradient macro. (Thanks to RunningUtes <RunningUtes@gmail.com>)\n***Insert tiddler comment tags {{{/% ... %/}}}. (new feature supported by TiddlyWiki 1.2.37)\n***Insert DateFormatString for {{{<<today>>}}} macro. (new feature supported by TiddlyWiki 1.2.37)\n**Enhanced:\n***Allow optional parameters in syntax.\n**Bugs:\n***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'\n*v1.0.0 (2005/10/30)\n**Initial release\n!Code\n***/\n//{{{\nconfig.macros.wikibar = {major: 2, minor: 0, revision: 0, beta: 3, date: new Date(2005,12,30)};\nconfig.macros.wikibar.handler = function(place,macroName,params,wikifier,paramString,tiddler){\n if(!(tiddler instanceof Tiddler)) {return;}\n story.setDirty(tiddler.title,true);\n place.id = 'wikibar'+tiddler.title;\n place.className = 'toolbar wikibar';\n};\nfunction wikibar_install(){\n config.commands.wikibar = {\n text: 'wikibar',\n tooltip: 'wikibar on/off',\n handler: function(e,src,title) {\n if(!e){ e = window.event; }\n var theButton = resolveTarget(e);\n theButton.id = 'wikibarButton'+title;\n wikibarPopup.remove();\n wikibar_installAddons(theButton, title);\n wikibar_createWikibar(title);\n return(false);\n }\n };\n config.shadowTiddlers['EditTemplate'] = wikibar_addWikibarCommand(config.shadowTiddlers['EditTemplate']);\n var tiddler = store.getTiddler('EditTemplate');\n if(tiddler){\n tiddler.text = wikibar_addWikibarCommand(tiddler.text);\n }\n}\nfunction wikibar_installAddons(theButton, title){\n var tiddlers = store.getTaggedTiddlers('wikibarAddons');\n if(!tiddlers) { return; }\n theButton.addons=[];\n for(var i=0; i<tiddlers.length; i++){\n try{\n eval(tiddlers[i].text);\n try{\n wikibar_addonInstall(title);\n wikibar_addonInstall = null;\n theButton.addons.push({ok:true, name:tiddlers[i].title});\n }catch(ex){\n theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});\n }\n }catch(ex){\n theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});\n }\n }\n}\nfunction wikibar_addWikibarCommand(tiddlerText){\n var div = document.createElement('div');\n div.style.display = 'none';\n div.innerHTML = tiddlerText;\n for(var i=0; i<div.childNodes.length; i++){\n var o=div.childNodes[i];\n if(o.tagName==='DIV'){\n if(o.className=='toolbar'){\n var macroText = o.getAttribute('macro').trim();\n if(macroText.search('wikibar')<=0){\n macroText += ' wikibar';\n o.setAttribute('macro', macroText);\n }\n break;\n }\n }\n }\n return div.innerHTML.replace(/\s"/g, "\s'");\n}\nfunction wikibar_processSyntaxParams(theSyntax, params){\n try{\n var pcr = 'AplWikibarPcr';\n var rx=null;\n var allParams=null;\n if(params){\n if(typeof(params)=='object'){\n for(var i=0; i<params.length; i++){\n if(params[i]){\n params[i] = params[i].replace(new RegExp('%','g'), pcr).trim();\n rx = '(\s\s[%'+(i+1)+'\s\s])' + '|' + '(%'+(i+1)+')';\n theSyntax = theSyntax.replace(new RegExp(rx,'g'), params[i] );\n }\n }\n allParams = params.join(' ').trim();\n }else{\n allParams = params.replace(new RegExp('%','g'), pcr).trim();\n rx = /(\s[%1{1}\s])|(%1{1})/g;\n theSyntax = theSyntax.replace(rx, allParams);\n }\n }\n if(allParams){\n theSyntax = theSyntax.replace(new RegExp('%N{1}','g'), allParams);\n }\n rx=/\s[%(([1-9]{1,}[0-9]{0,})|(N{1}))\s]/g;\n theSyntax = theSyntax.replace(rx, '');\n rx=/%(([1-9]{1,}[0-9]{0,})|(N{1}))/g;\n if( theSyntax.match(rx) ){\n throw 'Not enough parameters! ' + theSyntax;\n }\n theSyntax=theSyntax.replace(new RegExp(pcr,'g'), '%');\n return theSyntax;\n } catch(ex){\n return null;\n }\n}\nfunction wikibar_resolveEditItem(tiddlerWrapper, itemName){\n if(tiddlerWrapper.hasChildNodes()){\n var c=tiddlerWrapper.childNodes;\n for(var i=0; i<c.length; i++){\n var txt=wikibar_resolveEditItem(c[i], itemName);\n if(!txt){\n continue;\n }else{\n return txt;\n }\n }\n }\n return ((tiddlerWrapper.getAttribute && tiddlerWrapper.getAttribute('edit')==itemName)? tiddlerWrapper : null);\n}\nfunction wikibar_resolveEditItemValue(tiddlerWrapper, itemName){\n var o = wikibar_resolveEditItem(tiddlerWrapper, itemName);\n return (o? o.value.replace(/\sr/mg,'') : null);\n}\nfunction wikibar_resolveTiddlerEditorWrapper(obj){\n if(obj.id=='tiddlerDisplay'){return null;}\n if((obj.getAttribute && obj.getAttribute('macro')=='edit text')){return obj;}\n return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);\n}\nfunction wikibar_resolveTiddlerEditor(obj){\n if(obj.hasChildNodes()){\n var c = obj.childNodes;\n for(var i=0; i<c.length; i++){\n var o=wikibar_resolveTiddlerEditor(c[i]);\n if(o){ return o;}\n }\n }\n return ((obj.getAttribute && obj.getAttribute('edit')=='text')? obj : null);\n}\nfunction wikibar_resolveTargetButton(obj){\n if(obj.id && obj.id.substring(0,7)=='wikibar'){ return null; }\n if(obj.tiddlerTitle){\n return obj;\n }else{\n return wikibar_resolveTargetButton(obj.parentNode);\n }\n}\nfunction wikibar_isValidMenuItem(tool){\n if(!tool){ return false; }\n if(tool.TYPE=='MENU' || tool.TYPE=='MAIN_MENU'){\n for(var key in tool){\n if(key.substring(0,8)=='DYNAITEM'){ return true; }\n if(wikibar_isValidMenuItem(tool[key])){ return true; }\n }\n return false;\n }else{\n return (tool.HANDLER? true : false);\n }\n}\nfunction wikibar_editFormat(param){\n var editor = param.button.editor;\n var params = param.params;\n clearMessage();\n if(!editor){ return; }\n var repText = wikibar_processSyntaxParams(this.syntax, params);\n if(repText===null){ return; }\n var st = editor.scrollTop;\n var ss = editor.selectionStart;\n var se = editor.selectionEnd;\n var frontText= '';\n var endText = '';\n var fullText = editor.value;\n if(se>ss && ss>=0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n }\n else if(ss===0 && (se===0 || se == fullText.length) ){\n endText = fullText;\n }\n else if(se==ss && ss>0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n }\n if(repText.indexOf('user_text')>=0 && this.hint){\n repText = repText.replace('user_text', this.hint);\n }\n editor.value = frontText + repText + endText;\n editor.selectionStart = ss;\n editor.selectionEnd = ss + repText.length;\n editor.scrollTop = st;\n editor.focus();\n}\nfunction wikibar_editFormatByWord(param){\n var editor = param.button.editor;\n var params = param.params;\n clearMessage();\n if(!editor){return;}\n var repText = wikibar_processSyntaxParams(this.syntax, params);\n if(repText===null){ return; }\n var st = editor.scrollTop;\n var ss = editor.selectionStart;\n var se = editor.selectionEnd;\n var frontText= '';\n var selText = '';\n var endText = '';\n var fullText = editor.value;\n if(se>ss && ss>=0){\n frontText = fullText.substring(0, ss);\n selText = fullText.substring(ss,se);\n endText = fullText.substring(se, fullText.length);\n }\n else if(ss===0 && (se===0 || se == fullText.length) ){\n endText = fullText;\n }\n else if(se==ss && ss>0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n if(!( fullText.charAt(ss-1).match(/\sW/gi) || fullText.charAt(ss).match(/\sW/gi) )){\n var m = frontText.match(/\sW/gi);\n if(m){\n ss = frontText.lastIndexOf(m[m.length-1])+1;\n }\n else{\n ss = 0;\n }\n m = endText.match(/\sW/gi);\n if(m){\n se += endText.indexOf(m[0]);\n }\n else{\n se = fullText.length;\n }\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n selText = fullText.substring(ss,se);\n }\n }\n if(selText.length>0){\n repText = repText.replace('user_text', selText);\n }\n if(repText.indexOf('user_text')>=0 && this.hint){\n repText = repText.replace('user_text', this.hint);\n }\n editor.value = frontText + repText + endText;\n editor.selectionStart = ss;\n editor.selectionEnd = ss + repText.length;\n editor.scrollTop = st;\n editor.focus();\n}\nfunction wikibar_editFormatByCursor(param){\n var editor = param.button.editor;\n var params = param.params;\n clearMessage();\n if(!editor){ return; }\n var repText = wikibar_processSyntaxParams(this.syntax, params);\n if(repText===null){ return; }\n var st = editor.scrollTop;\n var ss = editor.selectionStart;\n var se = editor.selectionEnd;\n var frontText= '';\n var endText = '';\n var fullText = editor.value;\n if(se>ss && ss>=0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n }\n else if(ss===0 && (se===0 || se == fullText.length) ){\n endText = fullText;\n }\n else if(se==ss && ss>0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n }\n if(repText.indexOf('user_text')>=0 && this.hint){\n repText = repText.replace('user_text', this.hint);\n }\n editor.value = frontText + repText + endText;\n editor.selectionStart = ss;\n editor.selectionEnd = ss + repText.length;\n editor.scrollTop = st;\n editor.focus();\n}\nfunction wikibar_editFormatByLine(param){\n var editor = param.button.editor;\n var params = param.params;\n clearMessage();\n if(!editor){ return; }\n var repText = wikibar_processSyntaxParams(this.syntax, params);\n if(repText===null){ return; }\n var st = editor.scrollTop;\n var ss = editor.selectionStart;\n var se = editor.selectionEnd;\n var frontText= '';\n var selText = '';\n var endText = '';\n var fullText = editor.value;\n if(se>ss && ss>=0){\n if(this.byBlock){\n frontText = fullText.substring(0, ss);\n selText = fullText.substring(ss,se);\n endText = fullText.substring(se, fullText.length);\n }\n else{\n se = ss;\n }\n }\n if(ss===0 && (se===0 || se == fullText.length) ){\n var m=fullText.match(/(\sn|\sr)/g);\n if(m){\n se = fullText.indexOf(m[0]);\n }else{\n se = fullText.length;\n }\n selText = fullText.substring(0, se);\n endText = fullText.substring(se, fullText.length);\n }\n else if(se==ss && ss>0){\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n m = frontText.match(/(\sn|\sr)/g);\n if(m){\n ss = frontText.lastIndexOf(m[m.length-1])+1;\n }\n else{\n ss = 0;\n }\n m = endText.match(/(\sn|\sr)/g);\n if(m){\n se += endText.indexOf(m[0]);\n }\n else{\n se = fullText.length;\n }\n frontText = fullText.substring(0, ss);\n selText = fullText.substring(ss,se);\n endText = fullText.substring(se, fullText.length);\n }\n if(selText.length>0){\n repText = repText.replace('user_text', selText);\n }\n if(repText.indexOf('user_text')>=0 && this.hint){\n repText = repText.replace('user_text', this.hint);\n }\n if(this.byBlock){\n if( (frontText.charAt(frontText.length-1)!='\sn') && ss>0 ){\n repText = '\sn' + repText;\n }\n if( (endText.charAt(0)!='\sn') || se==fullText.length){\n repText += '\sn';\n }\n }\n editor.value = frontText + repText + endText;\n editor.selectionStart = ss;\n editor.selectionEnd = ss + repText.length;\n editor.scrollTop = st;\n editor.focus();\n}\nfunction wikibar_editFormatByTableCell(param){\n var editor = param.button.editor;\n var params = param.params;\n clearMessage();\n if(!editor){ return; }\n var repText = wikibar_processSyntaxParams(this.syntax, params);\n if(repText===null){ return; }\n var st = editor.scrollTop;\n var ss = editor.selectionStart;\n var se = editor.selectionEnd;\n var frontText= '';\n var selText = '';\n var endText = '';\n var fullText = editor.value;\n if(ss===0 || ss==fullText.length){\n throw 'not valid cell!';\n }\n se=ss;\n frontText = fullText.substring(0, ss);\n endText = fullText.substring(se, fullText.length);\n i=frontText.lastIndexOf('\sn');\n j=frontText.lastIndexOf('|');\n if(i>j || j<0){\n throw 'not valid cell!';\n }\n ss = j+1;\n i=endText.indexOf('\sn');\n j=endText.indexOf('|');\n if(i<j || j<0){\n throw 'not valid cell!';\n }\n se += j;\n frontText = fullText.substring(0, ss-1);\n selText = fullText.substring(ss,se);\n endText = fullText.substring(se+1, fullText.length);\n if(this.key.substring(0,5)=='align'){\n selText = selText.trim();\n if( selText=='>' || selText=='~' || selText.substring(0,8)=='bgcolor(') {return; }\n }\n if(selText.length>0){\n repText = repText.replace('user_text', selText);\n }\n if(repText.indexOf('user_text')>=0 && this.hint){\n repText = repText.replace('user_text', this.hint);\n }\n editor.value = frontText + repText + endText;\n editor.selectionStart = ss;\n editor.selectionEnd = ss + repText.length - 2;\n editor.scrollTop = st;\n editor.focus();\n}\nfunction wikibar_editSelectAll(param){\n var editor = param.button.editor;\n editor.selectionStart = 0;\n editor.selectionEnd = editor.value.length;\n editor.scrollTop = 0;\n editor.focus();\n}\nfunction wikibar_doPreview(param){\n var theButton = param.button;\n var editor = param.button.editor;\n var wikibar = theButton.parentNode;\n if(!wikibar) { return; }\n title = theButton.tiddlerTitle;\n var editorWrapper = wikibar_resolveTiddlerEditorWrapper(editor);\n var tiddlerWrapper = editorWrapper.parentNode;\n var previewer = document.getElementById('previewer'+title);\n if(previewer){\n previewer.parentNode.removeChild(previewer);\n editorWrapper.style.display = 'block';\n visible=true;\n }else{\n previewer = document.createElement('div');\n previewer.id = 'previewer'+title;\n previewer.className = 'viewer previewer';\n previewer.style.height = (editor.offsetHeight) + 'px';\n wikify(editor.value, previewer);\n tiddlerWrapper.insertBefore(previewer, editorWrapper);\n editorWrapper.style.display = 'none';\n visible=false;\n }\n var pv=null;\n for(var i=0; i<wikibar.childNodes.length; i++){\n try{\n var btn = wikibar.childNodes[i];\n if(btn.toolItem.key == 'preview'){ pv=btn; }\n if(btn.toolItem.key != 'preview'){\n btn.style.display = visible ? '': 'none';\n }\n }catch(ex){}\n }\n if(!pv) { return; }\n if(visible){\n pv.innerHTML = '<font face=\s"verdana\s">&infin;</font>';\n pv.title = 'preview current tiddler';\n }\n else{\n pv.innerHTML = '<font face=\s"verdana\s">&larr;</font>';\n pv.title = 'back to editor';\n }\n}\nfunction wikibar_doListAddons(param){\n clearMessage();\n var title = param.button.tiddlerTitle;\n var wikibarButton = document.getElementById('wikibarButton'+title);\n var ok=0, fail=0;\n for(var i=0; i<wikibarButton.addons.length; i++){\n var addon=wikibarButton.addons[i];\n if(addon.ok){\n displayMessage('[ o ] '+addon.name);\n ok++;\n }\n else{\n displayMessage('[ x ] '+addon.name + ': ' + addon.error);\n fail++;\n }\n }\n displayMessage('---------------------------------');\n displayMessage(ok + ' ok ; ' + fail + ' failed');\n}\nfunction wikibar_getColorCode(param){\n var cbOnPickColor = function(colorCode, param){\n param.params = colorCode;\n param.button.toolItem.doMore(param);\n };\n wikibarColorTool.openColorPicker(param.button, cbOnPickColor, param);\n}\nfunction wikibar_getLinkUrl(param){\n var url= prompt('Please enter the link target', (this.param? this.param : ''));\n if (url && url.trim().length>0){\n param.params = url;\n this.doMore(param);\n }\n}\nfunction wikibar_getTableRowCol(param){\n var rc= prompt('Please enter (rows x cols) of the table', '2 x 3');\n if (!rc || (rc.trim()).length<=0){ return; }\n var arr = rc.toUpperCase().split('X');\n if(arr.length != 2) { return; }\n for(var i=0; i<arr.length; i++){\n if(isNaN(arr[i].trim())) { return; }\n }\n var rows = parseInt(arr[0].trim(), 10);\n var cols = parseInt(arr[1].trim(), 10);\n var txtTable='';\n for(var r=0; r<rows; r++){\n for(var c=0; c<=cols; c++){\n if(c===0){\n txtTable += '|';\n }else{\n txtTable += ' |';\n }\n }\n txtTable += '\sn';\n }\n if(txtTable.trim().length>0){\n param.params = txtTable.trim();\n this.doMore(param);\n }\n}\nfunction wikibar_getMacroParam(param){\n var p = prompt('Please enter the parameters of macro \s"' + this.key + '\s":' +\n '\snSyntax: ' + this.syntax +\n '\sn\snNote: '+\n '\sn%1,%2,... - parameter needed'+\n '\sn[%1] - optional parameter'+\n '\sn%N - more than one parameter(1~n)'+\n '\sn[%N] - any number of parameters(0~n)'+\n '\sn\snPS:'+\n '\sn1. Parameters should be seperated with space character'+\n '\sn2. Use \s" to wrap the parameter that includes space character, ex: \s"hello world\s"'+\n '\sn3. Input the word(null) for the optional parameter ignored',\n (this.param? this.param : '') );\n if(!p) { return; }\n p=p.readMacroParams();\n for(var i=0; i<p.length; i++){\n var s=p[i].trim();\n if(s.indexOf(' ')>0){ p[i]="'"+s+"'"; }\n if(s.toLowerCase()=='null'){ p[i]=null; }\n }\n param.params = p;\n this.doMore(param);\n}\nfunction wikibar_getMorePalette(unused){\n clearMessage();\n displayMessage('Get more color palettes(*.gpl) from ColorZilla Palettes site', 'http:\s/\s/www.iosart.com/firefox/colorzilla/palettes.html');\n displayMessage('Save it as a new tiddler with \s"ColorPalettes\s" tag');\n}\nfunction wikibar_createWikibar(title){\n var theWikibar = document.getElementById('wikibar' + title);\n if(theWikibar){\n if(theWikibar.hasChildNodes()){\n theWikibar.style.display = (theWikibar.style.display=='block'? 'none':'block');\n return;\n }\n }\n var tiddlerWrapper = document.getElementById('tiddler'+title);\n var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);\n if(!theTextarea){\n clearMessage();\n displayMessage('WikiBar only works in tiddler edit mode now');\n return;\n }else{\n if(!theTextarea.id){ theTextarea.id = 'editor'+title; }\n if(!theTextarea.parentNode.id){ theTextarea.parentNode.id='editorWrapper'+title; }\n }\n if(theWikibar){\n theWikibar = document.getElementById('wikibar'+title);\n }else{\n var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);\n theWikibar = createTiddlyElement(tiddlerWrapper, 'div', 'wikibar'+title, 'toolbar');\n addClass(theWikibar, 'wikibar');\n var previewer = document.getElementById('previewer'+title);\n if(previewer){\n tiddlerWrapper.insertBefore(theWikibar, previewer);\n }else{\n tiddlerWrapper.insertBefore(theWikibar, editorWrapper);\n }\n }\n wikibar_createMenu(theWikibar,wikibarStore,title,theTextarea);\n if(config.options['chkWikibarSetEditorHeight'] && config.options['txtWikibarEditorRows']){\n theTextarea.rows = config.options['txtWikibarEditorRows'];\n }\n setStylesheet(\n '.wikibar{text-align:left;visibility:visible;margin:2px;padding:1px;}.previewer{overflow:auto;display:block;border:1px solid;}#colorPicker{position:absolute;display:none;z-index:10;margin:0px;padding:0px;}#colorPicker table{margin:0px;padding:0px;border:2px solid #000;border-spacing:0px;border-collapse:collapse;}#colorPicker td{margin:0px;padding:0px;border:1px solid;font-size:11px;text-align:center;cursor:auto;}#colorPicker .header{background-color:#fff;}#colorPicker .button{background-color:#fff;cursor:pointer;cursor:hand;}#colorPicker .button:hover{padding-top:3px;padding-bottom:3px;color:#fff;background-color:#136;}#colorPicker .cell{padding:4px;font-size:7px;cursor:crosshair;}#colorPicker .cell:hover{padding:10px;}.wikibarPopup{position:absolute;z-index:10;border:1px solid #014;color:#014;background-color:#cef;}.wikibarPopup table{margin:0;padding:0;border:0;border-spacing:0;border-collapse:collapse;}.wikibarPopup .button:hover{color:#eee;background-color:#014;}.wikibarPopup .disabled{color:#888;}.wikibarPopup .disabled:hover{color:#888;background-color:#cef;}.wikibarPopup tr .seperator hr{margin:0;padding:0;background-color:#cef;width:100%;border:0;border-top:1px dashed #014;}.wikibarPopup tr .icon{font-family:verdana;font-weight:bolder;}.wikibarPopup tr .marker{font-family:verdana;font-weight:bolder;}.wikibarPopup td{font-size:0.9em;padding:2px;}.wikibarPopup input{border:0;border-bottom:1px solid #014;margin:0;padding:0;font-family:arial;font-size:100%;background-color:#fff;}',\n 'WikiBarStyleSheet');\n}\nfunction wikibar_createMenu(place,toolset,title,editor){\n if(!wikibar_isValidMenuItem(toolset)){return;}\n if(!(toolset.TYPE=='MAIN_MENU' || toolset.TYPE=='MENU')){ return; }\n for(var key in toolset){\n if(key.substring(0,9)=='SEPERATOR'){\n wikibar_createMenuSeperator(place);\n continue;\n }\n if(key.substring(0,8)=='DYNAITEM'){\n var dynaTools = toolset[key](title,editor);\n if(dynaTools.TYPE && dynaTools.TYPE=='MENU'){\n wikibar_createMenuItem(place,dynaTools,null,editor,title);\n }else{\n dynaTools.TYPE = 'MENU';\n wikibar_createMenu(place, dynaTools, title, editor);\n }\n continue;\n }\n if((toolset[key].TYPE!='MENU' && toolset[key].TYPE!='MAIN_MENU') && !toolset[key].HANDLER){continue;}\n wikibar_createMenuItem(place,toolset,key,editor,title);\n }\n}\nfunction wikibar_createMenuItem(place,toolset,key,editor,title){\n if(!key){\n var tool = toolset;\n }else{\n tool = toolset[key];\n tool.key = key;\n }\n if(!wikibar_isValidMenuItem(tool)){return;}\n var toolIsOnMainMenu = (toolset.TYPE=='MAIN_MENU');\n var toolIsMenu = (tool.TYPE=='MENU');\n var theButton;\n if(toolIsOnMainMenu){\n theButton = createTiddlyButton(\n place,\n '',\n (tool.TOOLTIP? tool.TOOLTIP : ''),\n (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem),\n 'button');\n theButton.innerHTML = (tool.CAPTION? tool.CAPTION : key);\n theButton.isOnMainMenu = true;\n addClass(theButton, (toolIsMenu? 'menu' : 'item'));\n place.appendChild( document.createTextNode('\sn') );\n if(!toolIsMenu){\n if(config.options['chkWikibarPopmenuOnMouseOver']){\n theButton.onmouseover = function(e){ wikibarPopup.remove(); };\n }\n }\n }else{\n theButton=createTiddlyElement(place, 'tr',key,'button');\n theButton.title = (tool.TOOLTIP? tool.TOOLTIP : '');\n theButton.onclick = (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem);\n var tdL = createTiddlyElement(theButton, 'td','','marker');\n var td = createTiddlyElement(theButton, 'td');\n var tdR = createTiddlyElement(theButton, 'td','','marker');\n td.innerHTML = (tool.CAPTION? tool.CAPTION : key);\n if(toolIsMenu){\n tdR.innerHTML='&nbsp;&nbsp;&rsaquo;';\n }\n if(tool.SELECTED){\n tdL.innerHTML = '&radic; ';\n addClass(theButton, 'selected');\n }\n if(tool.DISABLED){\n addClass(theButton, 'disabled');\n }\n }\n theButton.tiddlerTitle = title;\n theButton.toolItem = tool;\n theButton.editor = editor;\n theButton.tabIndex = 999;\n if(toolIsMenu){\n if(config.options['chkWikibarPopmenuOnMouseOver']){\n theButton.onmouseover = wikibar_onClickMenuItem;\n }\n }\n}\nfunction wikibar_createMenuSeperator(place){\n if(place.id.substring(0,7)=='wikibar') { return; }\n var onclickSeperator=function(e){\n if(!e){ e = window.event; }\n e.cancelBubble = true;\n if (e.stopPropagation){ e.stopPropagation(); }\n return(false);\n };\n var theButton=createTiddlyElement(place,'tr','','seperator');\n var td = createTiddlyElement(theButton, 'td','','seperator');\n td.colSpan=3;\n theButton.onclick=onclickSeperator;\n td.innerHTML = '<hr>';\n}\nfunction wikibar_genWikibarAbout(){\n var toolset={};\n toolset.version = {\n CAPTION: '<center>WikiBar ' +\n config.macros.wikibar.major + '.' +\n config.macros.wikibar.minor + '.' +\n config.macros.wikibar.revision +\n (config.macros.wikibar.beta? ' beta '+config.macros.wikibar.beta : '') +\n '</center>',\n HANDLER: function(){}\n };\n toolset.SEPERATOR = {};\n toolset.author = {\n CAPTION: '<center>Arphen Lin<br>arphenlin@gmail.com</center>',\n TOOLTIP: 'send mail to the author',\n HANDLER: function(){ window.open('mailto:arphenlin@gmail.com'); }\n };\n toolset.website = {\n CAPTION: '<center>aiddlywiki.sourceforge.net</center>',\n TOOLTIP: 'go to the web site of WikiBar',\n HANDLER: function(){ window.open('http:\s/\s/aiddlywiki.sourceforge.net/'); }\n };\n return toolset;\n}\nfunction wikibar_genWikibarOptions(title, editor){\n var toolset={};\n toolset.popOnMouseOver = {\n CAPTION:'popup menu on mouse over',\n SELECTED: config.options['chkWikibarPopmenuOnMouseOver'],\n HANDLER: function(param){\n config.options['chkWikibarPopmenuOnMouseOver'] = !config.options['chkWikibarPopmenuOnMouseOver'];\n saveOptionCookie('chkWikibarPopmenuOnMouseOver');\n var title = param.button.tiddlerTitle;\n var wikibar = document.getElementById('wikibar'+title);\n if(wikibar){ wikibar.parentNode.removeChild(wikibar); }\n wikibar_createWikibar(title);\n }\n };\n toolset.setEditorSize = {\n CAPTION:'set editor height: <input id=\s"txtWikibarEditorRows\s" type=text size=1 MAXLENGTH=3 value=\s"' +\n (config.options['txtWikibarEditorRows']? config.options['txtWikibarEditorRows']:editor.rows) + '\s"> ok',\n HANDLER: function(param){\n var input = document.getElementById('txtWikibarEditorRows');\n if(input){\n var rows = parseInt(input.value, 10);\n if(!isNaN(rows)){\n var editor = param.button.editor;\n editor.rows = rows;\n }else{\n rows=config.maxEditRows;\n }\n config.options['txtWikibarEditorRows'] = rows;\n saveOptionCookie('txtWikibarEditorRows');\n config.maxEditRows = rows;\n }\n }\n };\n toolset.setEditorSizeOnLoadingWikibar = {\n CAPTION:'set editor height on loading wikibar',\n SELECTED: config.options['chkWikibarSetEditorHeight'],\n HANDLER: function(param){\n config.options['chkWikibarSetEditorHeight'] = !config.options['chkWikibarSetEditorHeight'];\n saveOptionCookie('chkWikibarSetEditorHeight');\n if(config.options['chkWikibarSetEditorHeight']){\n var rows = config.options['txtWikibarEditorRows'];\n if(!isNaN(rows)){ rows = 15; }\n var editor = param.button.editor;\n editor.rows = rows;\n config.options['txtWikibarEditorRows'] = rows;\n saveOptionCookie('txtWikibarEditorRows');\n }\n }\n };\n toolset.SEPERATOR = {};\n toolset.update = {\n CAPTION: 'check for updates',\n DISABLED: true,\n HANDLER: function(){}\n };\n return toolset;\n}\nfunction wikibar_genPaletteSelector(){\n try{\n var cpTiddlers = store.getTaggedTiddlers('ColorPalettes');\n if(!cpTiddlers) { return; }\n var palettes=[];\n palettes.push(wikibarColorTool.defaultPaletteName);\n for(var i=0; i<cpTiddlers.length; i++){\n palettes.push(cpTiddlers[i].title.trim());\n }\n var toolset={};\n for(i=0; i<palettes.length; i++){\n toolset[palettes[i]] = {\n TOOLTIP: palettes[i],\n SELECTED: (palettes[i]==wikibarColorTool.paletteName),\n HANDLER: wikibar_doSelectPalette\n };\n }\n return toolset;\n }catch(ex){ return null; }\n}\nfunction wikibar_onClickItem(e){\n if(!e){ e = window.event; }\n var theTarget = resolveTarget(e);\n if(theTarget.tagName=='INPUT'){\n e.cancelBubble = true;\n if (e.stopPropagation){ e.stopPropagation(); }\n return;\n }\n var theButton = wikibar_resolveTargetButton(theTarget);\n if(!theButton){ return(false); }\n var o = theButton.toolItem;\n if(!o) { return; }\n var param = {\n event: e,\n button: theButton\n };\n if(o.HANDLER){ o.HANDLER(param); }\n if(o.DISABLED){\n e.cancelBubble = true;\n if (e.stopPropagation){ e.stopPropagation(); }\n }\n return(false);\n}\nfunction wikibar_onClickMenuItem(e){\n if(!e){ e = window.event; }\n var theButton = wikibar_resolveTargetButton(resolveTarget(e));\n if(!theButton){ return(false); }\n e.cancelBubble = true;\n if (e.stopPropagation){ e.stopPropagation(); }\n var title = theButton.tiddlerTitle;\n var editor = theButton.editor;\n var tool = theButton.toolItem;\n if(!tool) { return; }\n var popup = wikibarPopup.create(this);\n if(popup){\n wikibar_createMenu(popup,tool,title,editor);\n if(!popup.hasChildNodes()){\n wikibarPopup.remove();\n }else{\n wikibarPopup.show(popup, false);\n }\n }\n return(false);\n}\nvar wikibarColorTool = {\n defaultPaletteName : 'default',\n defaultColumns : 16,\n defaultPalette : [\n '#FFF','#DDD','#CCC','#BBB','#AAA','#999','#666','#333','#111','#000','#FC0','#F90','#F60','#F30','#C30','#C03',\n '#9C0','#9D0','#9E0','#E90','#D90','#C90','#FC3','#FC6','#F96','#F63','#600','#900','#C00','#F00','#F36','#F03',\n '#CF0','#CF3','#330','#660','#990','#CC0','#FF0','#C93','#C63','#300','#933','#C33','#F33','#C36','#F69','#F06',\n '#9F0','#CF6','#9C3','#663','#993','#CC3','#FF3','#960','#930','#633','#C66','#F66','#903','#C39','#F6C','#F09',\n '#6F0','#9F6','#6C3','#690','#996','#CC6','#FF6','#963','#630','#966','#F99','#F39','#C06','#906','#F3C','#F0C',\n '#3F0','#6F3','#390','#6C0','#9F3','#CC9','#FF9','#C96','#C60','#C99','#F9C','#C69','#936','#603','#C09','#303',\n '#0C0','#3C0','#360','#693','#9C6','#CF9','#FFC','#FC9','#F93','#FCC','#C9C','#969','#939','#909','#636','#606',\n '#060','#3C3','#6C6','#0F0','#3F3','#6F6','#9F9','#CFC','#9CF','#FCF','#F9F','#F6F','#F3F','#F0F','#C6C','#C3C',\n '#030','#363','#090','#393','#696','#9C9','#CFF','#39F','#69C','#CCF','#C9F','#96C','#639','#306','#90C','#C0C',\n '#0F3','#0C3','#063','#396','#6C9','#9FC','#9CC','#06C','#369','#99F','#99C','#93F','#60C','#609','#C3F','#C0F',\n '#0F6','#3F6','#093','#0C6','#3F9','#9FF','#699','#036','#039','#66F','#66C','#669','#309','#93C','#C6F','#90F',\n '#0F9','#6F9','#3C6','#096','#6FF','#6CC','#366','#069','#36C','#33F','#33C','#339','#336','#63C','#96F','#60F',\n '#0FC','#6FC','#3C9','#3FF','#3CC','#399','#033','#39C','#69F','#00F','#00C','#009','#006','#003','#63F','#30F',\n '#0C9','#3FC','#0FF','#0CC','#099','#066','#3CF','#6CF','#09C','#36F','#0CF','#09F','#06F','#03F','#03C','#30C'\n ],\n colorPicker : null,\n pickColorHandler: null,\n userData: null\n};\nwikibarColorTool.paletteName = wikibarColorTool.defaultPaletteName;\nwikibarColorTool.columns = wikibarColorTool.defaultColumns;\nwikibarColorTool.palette = wikibarColorTool.defaultPalette;\nwikibarColorTool.onPickColor = function(e){\n if (!e){ e = window.event; }\n var theCell = resolveTarget(e);\n if(!theCell){ return(false); }\n color = theCell.bgColor.toLowerCase();\n if(!color) { return; }\n wikibarColorTool.displayColorPicker(false);\n if(wikibarColorTool.pickColorHandler){\n wikibarColorTool.pickColorHandler(color, wikibarColorTool.userData);\n }\n return(false);\n};\nwikibarColorTool.onMouseOver = function(e){\n if (!e){ e = window.event; }\n var theButton = resolveTarget(e);\n if(!theButton){ return(false); }\n if(!wikibarColorTool) { return; }\n color = theButton.bgColor.toUpperCase();\n if(!color) { return; }\n td=document.getElementById('colorPickerInfo');\n if(!td) { return; }\n td.bgColor = color;\n td.innerHTML = '<span style=\s"color:#000;\s">'+color+'</span>&nbsp;&nbsp;&nbsp;' +\n '<span style=\s"color:#fff;\s">'+color+'</span>';\n e.cancelBubble = true;\n if (e.stopPropagation){ e.stopPropagation(); }\n return(false);\n};\nwikibarColorTool.openColorPicker = function(theTarget, pickColorHandler, userData){\n wikibarColorTool.skipClickDocumentEvent = true;\n wikibarColorTool.pickColorHandler = pickColorHandler;\n wikibarColorTool.userData = userData;\n wikibarColorTool.moveColorPicker(theTarget);\n};\nwikibarColorTool.convert3to6HexColor = function(c){\n c=c.trim();\n var rx=/^\s#(\sd|[a-f])(\sd|[a-f])(\sd|[a-f])$/gi;\n return (rx.test(c)? c.replace(rx, '#$1$1$2$2$3$3') : c);\n};\nwikibarColorTool.numToHexColor = function (n){\n if(typeof(n)=='number' && (n>=0 && n<=255)) {\n s = n.toString(16).toLowerCase();\n return ((s.length==1)? '0'+s : s);\n }else{\n return null;\n }\n};\nwikibarColorTool.renderColorPalette = function(){\n if(wikibarColorTool.paletteName==wikibarColorTool.defaultPaletteName){\n wikibarColorTool.palette=wikibarColorTool.defaultPalette;\n wikibarColorTool.columns=wikibarColorTool.defaultColumns;\n return;\n }\n tiddlerText = (store.getTiddlerText(wikibarColorTool.paletteName, '')).trim();\n if(tiddlerText.length<=0) { return; }\n var cpContents = tiddlerText.split('\sn');\n var colors=[];\n columns = wikibarColorTool.defaultColumns;\n var tmpArray=null;\n errCount=0;\n for(var i=0; i<cpContents.length; i++){\n cpLine=cpContents[i].trim();\n if( (!cpLine) || (cpLine.length<=0) || (cpLine.charAt(0) == '#') ){ continue; }\n if(cpLine.substring(0,8).toLowerCase()=='columns:'){\n tmpArray = cpLine.split(':');\n try{\n columns = parseInt(tmpArray[1],10);\n }catch(ex){\n columns = wikibarColorTool.defaultColumns;\n }\n }else{\n tmpArray = cpLine.replace('\st', ' ').split(/[ ]{1,}/);\n try{\n color='';\n for(var j=0; j<3; j++){\n c=parseInt(tmpArray[j].trim(), 10);\n if(isNaN(c)){\n break;\n }else{\n c=wikibarColorTool.numToHexColor(c);\n if(!c) {break;}\n color+=c;\n }\n }\n if(color.length==6){\n colors.push('#'+color);\n } else {\n throw 'error';\n }\n }catch(ex){\n }\n }\n }\n if(colors.length>0){\n wikibarColorTool.palette = colors;\n wikibarColorTool.columns = columns;\n }else{\n throw 'renderColorPalette(): No color defined in the palette.';\n }\n};\nwikibarColorTool.displayColorPicker = function(visible){\n if(wikibarColorTool.colorPicker){\n wikibarColorTool.colorPicker.style.display = (visible? 'block' : 'none');\n }\n};\nwikibarColorTool.moveColorPicker = function(theTarget){\n if(!wikibarColorTool.colorPicker){\n wikibarColorTool.createColorPicker();\n }\n var cp = wikibarColorTool.colorPicker;\n var rootLeft = findPosX(theTarget);\n var rootTop = findPosY(theTarget);\n var popupLeft = rootLeft;\n var popupTop = rootTop;\n var popupWidth = cp.offsetWidth;\n var winWidth = findWindowWidth();\n if(popupLeft + popupWidth > winWidth){\n popupLeft = winWidth - popupWidth;\n }\n cp.style.left = popupLeft + 'px';\n cp.style.top = popupTop + 'px';\n wikibarColorTool.displayColorPicker(true);\n};\nwikibarColorTool.createColorPicker = function(unused, palette){\n if(palette){ wikibarColorTool.paletteName=palette; }\n wikibarColorTool.renderColorPalette();\n wikibarColorTool.colorPicker = document.createElement('div');\n wikibarColorTool.colorPicker.id = 'colorPicker';\n document.body.appendChild(wikibarColorTool.colorPicker);\n var theTable = document.createElement('table');\n wikibarColorTool.colorPicker.appendChild(theTable);\n var theTR = document.createElement('tr');\n theTable.appendChild(theTR);\n var theTD = document.createElement('td');\n theTD.className = 'header';\n theTD.colSpan = wikibarColorTool.columns;\n theTD.innerHTML = wikibarColorTool.paletteName;\n theTR.appendChild(theTD);\n for(var i=0; i<wikibarColorTool.palette.length; i++){\n if((i%wikibarColorTool.columns)===0){\n theTR = document.createElement('tr');\n theTable.appendChild(theTR);\n }\n theTD = document.createElement('td');\n theTD.className = 'cell';\n theTD.bgColor = wikibarColorTool.convert3to6HexColor(wikibarColorTool.palette[i]);\n theTD.onclick = wikibarColorTool.onPickColor;\n theTD.onmouseover = wikibarColorTool.onMouseOver;\n theTR.appendChild(theTD);\n }\n rest = wikibarColorTool.palette.length % wikibarColorTool.columns;\n if(rest>0){\n theTD = document.createElement('td');\n theTD.colSpan = wikibarColorTool.columns-rest;\n theTD.bgColor = '#000000';\n theTR.appendChild(theTD);\n }\n theTR = document.createElement('tr');\n theTable.appendChild(theTR);\n theTD = document.createElement('td');\n theTD.colSpan = wikibarColorTool.columns;\n theTD.id = 'colorPickerInfo';\n theTR.appendChild(theTD);\n};\nwikibarColorTool.onDocumentClick = function(e){\n if (!e){ e = window.event; }\n if(wikibarColorTool.skipClickDocumentEvent) {\n wikibarColorTool.skipClickDocumentEvent = false;\n return true;\n }\n if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){\n wikibarColorTool.displayColorPicker(false);\n }\n return true;\n};\nfunction wikibar_doSelectPalette(param){\n clearMessage();\n var theButton = param.button;\n if(!theButton.toolItem.key) { return; }\n var palette = theButton.toolItem.key;\n var oldPaletteName = wikibarColorTool.paletteName;\n if(oldPaletteName != palette){\n try{\n wikibarColorTool.createColorPicker(theButton, palette);\n displayMessage('Palette \s"'+palette+'\s" ('+ wikibarColorTool.palette.length +' colors) is selected');\n }catch(ex){\n errMsg = ex;\n if(errMsg.substring(0,18)=='renderColorPalette'){\n displayMessage('Invalid palette \s"' + palette + '\s", please check it out!');\n wikibarColorTool.createColorPicker(theButton, oldPaletteName);\n }\n }\n }\n}\nvar wikibarPopup = {\n skipClickDocumentEvent: false,\n stack: []\n};\nwikibarPopup.resolveRootPopup = function(o){\n if(o.isOnMainMenu){ return null; }\n if(o.className.substring(0,12)=='wikibarPopup'){ return o;}\n return wikibarPopup.resolveRootPopup(o.parentNode);\n};\nwikibarPopup.create = function(root){\n for(var i=0; i<wikibarPopup.stack.length; i++){\n var p=wikibarPopup.stack[i];\n if(p.root==root){\n wikibarPopup.removeFrom(i+1);\n return null;\n }\n }\n var rootPopup = wikibarPopup.resolveRootPopup(root);\n if(!rootPopup){\n wikibarPopup.remove();\n }else{\n wikibarPopup.removeFromRootPopup(rootPopup);\n }\n var popup = createTiddlyElement(document.body,'div','wikibarPopup'+root.toolItem.key,'wikibarPopup');\n var pop = createTiddlyElement(popup,'table','','');\n wikibarPopup.stack.push({rootPopup: rootPopup, root: root, popup: popup});\n return pop;\n};\nwikibarPopup.show = function(unused,slowly){\n var curr = wikibarPopup.stack[wikibarPopup.stack.length-1];\n var overlayWidth = 1;\n var rootLeft, rootTop, rootWidth, rootHeight, popupLeft, popupTop, popupWidth;\n if(curr.rootPopup){\n rootLeft = findPosX(curr.rootPopup);\n rootTop = findPosY(curr.root);\n rootWidth = curr.rootPopup.offsetWidth;\n popupLeft = rootLeft + rootWidth - overlayWidth;\n popupTop = rootTop;\n }else{\n rootLeft = findPosX(curr.root);\n rootTop = findPosY(curr.root);\n rootHeight = curr.root.offsetHeight;\n popupLeft = rootLeft;\n popupTop = rootTop + rootHeight;\n }\n var winWidth = findWindowWidth();\n popupWidth = curr.popup.offsetWidth;\n if(popupLeft + popupWidth > winWidth){\n popupLeft = rootLeft - popupWidth + overlayWidth;\n }\n curr.popup.style.left = popupLeft + 'px';\n curr.popup.style.top = popupTop + 'px';\n curr.popup.style.display = 'block';\n addClass(curr.root, 'highlight');\n if(config.options.chkAnimate){\n anim.startAnimating(new Scroller(curr.popup,slowly));\n }else{\n window.scrollTo(0,ensureVisible(curr.popup));\n }\n};\nwikibarPopup.remove = function(){\n if(wikibarPopup.stack.length > 0){\n wikibarPopup.removeFrom(0);\n }\n};\nwikibarPopup.removeFrom = function(from){\n for(var t=wikibarPopup.stack.length-1; t>=from; t--){\n var p = wikibarPopup.stack[t];\n removeClass(p.root,'highlight');\n p.popup.parentNode.removeChild(p.popup);\n }\n wikibarPopup.stack = wikibarPopup.stack.slice(0,from);\n};\nwikibarPopup.removeFromRootPopup = function(from){\n for(var t=0; t<wikibarPopup.stack.length; t++){\n var p = wikibarPopup.stack[t];\n if(p.rootPopup==from){\n wikibarPopup.removeFrom(t);\n break;\n }\n }\n};\nwikibarPopup.onDocumentClick = function(e){\n if (!e){ e = window.event; }\n if(wikibarPopup.skipClickDocumentEvent){\n wikibarPopup.skipClickDocumentEvent=false;\n return true;\n }\n if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){\n wikibarPopup.remove();\n }\n return true;\n};\nvar wikibarStore = {\n TYPE: 'MAIN_MENU',\n help:{\n TYPE:'MENU',\n CAPTION: '<font face=\s"verdana\s">?</font>',\n TOOLTIP: 'about WikiBar',\n options:{\n TYPE:'MENU',\n DYNAITEM: wikibar_genWikibarOptions\n },\n about:{\n TYPE:'MENU',\n DYNAITEM: wikibar_genWikibarAbout\n }\n },\n preview:{\n TOOLTIP: 'preview this tiddler',\n CAPTION: '<font face=\s"verdana\s">&infin;</font>',\n HANDLER: wikibar_doPreview\n },\n line:{\n TOOLTIP: 'horizontal line',\n CAPTION: '<font face=\s"verdana\s">&mdash;</font>',\n syntax: '\sn----\sn',\n HANDLER: wikibar_editFormatByCursor\n },\n crlf:{\n TOOLTIP: 'new line',\n CAPTION: '<font face=\s"verdana\s">&para;</font>',\n syntax: '\sn',\n HANDLER: wikibar_editFormatByCursor\n },\n selectAll:{\n TOOLTIP: 'select all',\n CAPTION: '<font face=\s"verdana\s">&sect;</font>',\n HANDLER: wikibar_editSelectAll\n },\n deleteSelected:{\n TOOLTIP: 'delete selected',\n CAPTION: '<font face=\s"verdana\s">&times;</font>',\n syntax: '',\n HANDLER: wikibar_editFormat\n },\n textFormat:{\n TYPE: 'MENU',\n CAPTION: 'text',\n TOOLTIP: 'text formatters',\n ignore:{\n TOOLTIP: 'ignore wiki word',\n CAPTION: 'ignore wikiWord',\n syntax: '~user_text',\n hint: 'wiki_word',\n HANDLER: wikibar_editFormatByWord\n },\n bolder:{\n TOOLTIP: 'bolder text',\n CAPTION: '<strong>bolder</strong>',\n syntax: "''user_text''",\n hint: 'bold_text',\n HANDLER: wikibar_editFormatByWord\n },\n italic:{\n TOOLTIP: 'italic text',\n CAPTION: '<em>italic</em>',\n syntax: '\s/\s/user_text\s/\s/',\n hint: 'italic_text',\n HANDLER: wikibar_editFormatByWord\n },\n underline:{\n TOOLTIP: 'underline text',\n CAPTION: '<u>underline</u>',\n syntax: '__user_text__',\n hint: 'underline_text',\n HANDLER: wikibar_editFormatByWord\n },\n strikethrough:{\n TOOLTIP: 'strikethrough text',\n CAPTION: '<strike>strikethrough</strike>',\n syntax: '==user_text==',\n hint: 'strikethrough_text',\n HANDLER: wikibar_editFormatByWord\n },\n superscript:{\n TOOLTIP: 'superscript text',\n CAPTION: 'X<sup>superscript</sup>',\n syntax: '^^user_text^^',\n hint: 'superscript_text',\n HANDLER: wikibar_editFormatByWord\n },\n subscript:{\n TOOLTIP: 'subscript text',\n CAPTION: 'X<sub>subscript</sub>',\n syntax: '~~user_text~~',\n hint: 'subscript_text',\n HANDLER: wikibar_editFormatByWord\n },\n comment:{\n TOOLTIP: 'comment text',\n CAPTION: 'comment text',\n syntax: '/%user_text%/',\n hint: 'comment_text',\n HANDLER: wikibar_editFormatByWord\n },\n monospaced:{\n TOOLTIP: 'monospaced text',\n CAPTION: '<code>monospaced</code>',\n syntax: '{{{user_text}}}',\n hint: 'monospaced_text',\n HANDLER: wikibar_editFormatByWord\n }\n },\n paragraph:{\n TYPE: 'MENU',\n TOOLTIP: 'paragarph formatters',\n list:{\n TYPE: 'MENU',\n TOOLTIP: 'list tools',\n bullet:{\n TOOLTIP: 'bullet point',\n syntax: '*user_text',\n hint: 'bullet_text',\n HANDLER: wikibar_editFormatByLine\n },\n numbered:{\n TOOLTIP: 'numbered list',\n syntax: '#user_text',\n hint: 'numbered_text',\n HANDLER: wikibar_editFormatByLine\n }\n },\n heading:{\n TYPE: 'MENU',\n heading1:{\n CAPTION:'<h1>Heading 1</h1>',\n TOOLTIP: 'Heading 1',\n syntax: '!user_text',\n hint: 'heading_1',\n HANDLER: wikibar_editFormatByLine\n },\n heading2:{\n CAPTION:'<h2>Heading 2<h2>',\n TOOLTIP: 'Heading 2',\n syntax: '!!user_text',\n hint: 'heading_2',\n HANDLER: wikibar_editFormatByLine\n },\n heading3:{\n CAPTION:'<h3>Heading 3</h3>',\n TOOLTIP: 'Heading 3',\n syntax: '!!!user_text',\n hint: 'heading_3',\n HANDLER: wikibar_editFormatByLine\n },\n heading4:{\n CAPTION:'<h4>Heading 4</h4>',\n TOOLTIP: 'Heading 4',\n syntax: '!!!!user_text',\n hint: 'heading_4',\n HANDLER: wikibar_editFormatByLine\n },\n heading5:{\n CAPTION:'<h5>Heading 5</h5>',\n TOOLTIP: 'Heading 5',\n syntax: '!!!!!user_text',\n hint: 'heading_5',\n HANDLER: wikibar_editFormatByLine\n }\n },\n comment:{\n TYPE: 'MENU',\n commentByLine:{\n CAPTION:'comment by line',\n TOOLTIP: 'line comment',\n syntax: '/%user_text%/',\n hint: 'comment_text',\n HANDLER: wikibar_editFormatByLine\n },\n commentByBlock:{\n CAPTION:'comment by block',\n TOOLTIP: 'block comment',\n syntax: '/%\snuser_text\sn%/',\n hint: 'comment_text',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n },\n monospaced:{\n TYPE: 'MENU',\n monosByLine:{\n CAPTION: 'monospaced by line',\n TOOLTIP: 'line monospaced',\n syntax: '{{{\snuser_text\sn}}}',\n hint: 'monospaced_text',\n HANDLER: wikibar_editFormatByLine\n },\n monosByBlock:{\n CAPTION: 'monospaced by block',\n TOOLTIP: 'block monospaced',\n syntax: '{{{\snuser_text\sn}}}',\n hint: 'monospaced_text',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n },\n quote:{\n TYPE: 'MENU',\n quoteByLine:{\n CAPTION: 'quote by line',\n TOOLTIP: 'line quote',\n syntax: '>user_text',\n hint: 'quote_text',\n HANDLER: wikibar_editFormatByLine\n },\n quoteByBlcok:{\n CAPTION: 'quote by block',\n TOOLTIP: 'block quote',\n syntax: '<<<\snuser_text\sn<<<',\n hint: 'quote_text',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n },\n plugin:{\n TYPE: 'MENU',\n code:{\n CAPTION: 'code area',\n TOOLTIP: 'block monospaced for plugin',\n syntax: '\sn\s/\s/{{{\snuser_text\sn\s/\s/}}}\sn',\n hint: 'monospaced_plugin_code',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n },\n commentByLine:{\n CAPTION: 'comment by line',\n TOOLTIP: 'line comment',\n syntax: '\s/\s/user_text',\n hint: 'plugin_comment',\n HANDLER: wikibar_editFormatByLine\n },\n commentByBlock:{\n CAPTION: 'comment by block',\n TOOLTIP: 'block comment',\n syntax: '\s/\s***\snuser_text\sn***\s/',\n hint: 'plugin_comment',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n },\n css:{\n TYPE: 'MENU',\n code:{\n CAPTION: 'code area',\n TOOLTIP: 'block monospaced for css',\n syntax: '\sn\snuser_text\sn\sn',\n hint: 'monospaced_css_code',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n },\n commentByLine:{\n CAPTION: 'comment by line',\n TOOLTIP: 'line comment',\n syntax: '',\n hint: 'css_comment',\n HANDLER: wikibar_editFormatByLine\n },\n commentByBlock:{\n CAPTION: 'comment by block',\n TOOLTIP: 'block comment',\n syntax: '',\n hint: 'css_comment',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n }\n },\n color:{\n TYPE: 'MENU',\n TOOLTIP: 'color tools',\n highlight:{\n CAPTION:'highlight text',\n TOOLTIP: 'highlight text',\n syntax: '@@user_text@@',\n hint: 'highlight_text',\n HANDLER: wikibar_editFormatByWord\n },\n color:{\n CAPTION:'text color',\n TOOLTIP: 'text color',\n hint: 'your_text',\n syntax: '@@color(%1):user_text@@',\n HANDLER: wikibar_getColorCode,\n doMore: wikibar_editFormatByWord\n },\n bgcolor:{\n CAPTION:'background color',\n TOOLTIP: 'background color',\n hint: 'your_text',\n syntax: '@@bgcolor(%1):user_text@@',\n HANDLER: wikibar_getColorCode,\n doMore: wikibar_editFormatByWord\n },\n colorcode:{\n CAPTION:'color code',\n TOOLTIP: 'insert color code',\n syntax: '%1',\n HANDLER: wikibar_getColorCode,\n doMore: wikibar_editFormatByCursor\n },\n 'color palette':{\n TYPE:'MENU',\n DYNAITEM: wikibar_genPaletteSelector,\n SEPERATOR:{},\n morePalette:{\n CAPTION:'more palettes',\n TOOLTIP:'get more palettes',\n HANDLER: wikibar_getMorePalette\n }\n }\n },\n link:{\n TYPE: 'MENU',\n TOOLTIP: 'insert link',\n wiki:{\n CAPTION:'wiki link',\n TOOLTIP: 'wiki link',\n syntax: '[[user_text]]',\n hint: 'wiki_word',\n HANDLER: wikibar_editFormatByWord\n },\n pretty:{\n CAPTION: 'pretty link',\n TOOLTIP: 'pretty link',\n syntax: '[[user_text|%1]]',\n hint: 'pretty_word',\n param: 'PrettyLink Target',\n HANDLER: wikibar_getLinkUrl,\n doMore: wikibar_editFormatByWord\n },\n url:{\n TOOLTIP: 'url link',\n syntax: '[[user_text|%1]]',\n hint: 'your_text',\n param: 'http:\s/\s/...',\n HANDLER: wikibar_getLinkUrl,\n doMore: wikibar_editFormatByWord\n },\n image:{\n TOOLTIP: 'image link',\n syntax: '[img[user_text|%1]]',\n hint: 'alt_text',\n param: 'image/icon.jpg',\n HANDLER: wikibar_getLinkUrl,\n doMore: wikibar_editFormatByWord\n }\n },\n macro:{},\n more:{\n TYPE: 'MENU',\n TOOLTIP: 'more tools',\n table:{\n TYPE: 'MENU',\n TOOLTIP: 'table',\n table:{\n CAPTION:'create table',\n TOOLTIP: 'create a new table',\n syntax: '\sn%1\sn',\n HANDLER: wikibar_getTableRowCol,\n doMore: wikibar_editFormatByWord\n },\n header:{\n TOOLTIP: 'table header text',\n syntax: '|user_text|c',\n hint: 'table_header',\n HANDLER: wikibar_editFormatByWord\n },\n cell:{\n TOOLTIP: 'create a tabel cell',\n syntax: '|user_text|',\n hint: 'your_text',\n HANDLER: wikibar_editFormatByWord\n },\n columnHeader:{\n CAPTION:'column header',\n TOOLTIP: 'create a column header cell',\n syntax: '|!user_text|',\n hint: 'column_header',\n HANDLER: wikibar_editFormatByWord\n },\n cell:{\n TYPE: 'MENU',\n CAPTION: 'cell options',\n bgcolor:{\n CAPTION: 'background color',\n TOOLTIP: 'cell bgcolor',\n syntax: '|bgcolor(%1):user_text|',\n hint: 'your_text',\n HANDLER: wikibar_getColorCode,\n doMore: wikibar_editFormatByTableCell\n },\n alignLeft:{\n CAPTION: 'align left',\n TOOLTIP: 'left align cell text',\n syntax: '|user_text|',\n hint: 'your_text',\n HANDLER: wikibar_editFormatByTableCell\n },\n alignCenter:{\n CAPTION: 'align center',\n TOOLTIP: 'center align cell text',\n syntax: '| user_text |',\n hint: 'your_text',\n HANDLER: wikibar_editFormatByTableCell\n },\n alignRight:{\n CAPTION: 'align right',\n TOOLTIP: 'right align cell text',\n syntax: '| user_text|',\n hint: 'your_text',\n HANDLER: wikibar_editFormatByTableCell\n }\n }\n },\n html:{\n TYPE: 'MENU',\n html:{\n CAPTION: '&lt;html&gt;',\n TOOLTIP: 'html tag',\n syntax: '<html>\snuser_text\sn</html>',\n hint: 'html_content',\n byBlock: true,\n HANDLER: wikibar_editFormatByLine\n }\n }\n },\n addon:{\n TYPE: 'MENU',\n TOOLTIP:'3rd party tools',\n 'about addons':{\n TOOLTIP: 'list loaded addons',\n HANDLER: wikibar_doListAddons\n },\n SEPERATOR:{}\n }\n};\naddEvent(document, 'click', wikibarColorTool.onDocumentClick);\naddEvent(document, 'click', wikibarPopup.onDocumentClick);\nwikibar_install();\n//}}}
[img[Zhejiang University|images/zju.jpg]]\n[[Zhejiang University |http://www.zju.edu.cn/english/]] is one of the best and oldest universities in China. Its history dates back to 1897 near the end of the Qing dynasty when it first came into existence. It is one of the top universities in China, especially in fields of science and engineering. Its main campus is located near the picturesque West Lake in the famous tourist city of Hangzhou, the capital of Zhejiang Province. The University has 52 undergraduate, 85 Master's, and 35 doctoral programs. Its post-doctoral programs cover 25 specialties. The University also operates three commercial corporations and one hospital. \n\nRecent Development: Zhejiang University officially combined with Hangzhou University, Zhejiang Medical University and Zhejiang Agriculture University (all located in the city of Hangzhou) in the summer of 1998. The combined university is called Zhejiang University which is now the largest univeristy in China with the most comprehensive disciplines and research areas. \n