Study Abroad Program in Salamanca, Spain
is loading ...

Requires Javascript.
Study Abroad Program in Salamanca, Spain
<!--{{{-->
<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 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

----
Also see AdvancedOptions
<<importTiddlers>>
Inicio del curso intensivo
Inicio viaje a Andalucía
Fin del viaje a Galicia
Inicio exámenes
último día de clases
Inicio del viaje a Andalucía
exámenes
fin exámenes
Fin viaje a Andalucía
Salida de España
exámenes
Salida de USA
llegada a USA
exámenes
llegada a Salamanca
exámenes
Inicio del curso Intensivo
Inicio del viaje al Norte de España
Fin del curso Intensivo
Fin del viaje a Andalucía
exámenes
Inicio del viaje a Madrid
Salida de España
llegada a USA
Fin del viaje al Norte de España
Fin del viaje a Madrid
Inicio del curso en la Universidad
San José
LLEGADA A MADRID Y SALAMANCA
INICIO DEL CURSO INTENSIVO
FIN DEL CURSO INTENSIVO
INICIO DEL VIAJE A MADRID
FIN DEL VIAJE A MADRID
INICIO DEL CURSO REGULAR
INICIO DEL VIAJE AL NORTE
FIN DEL VIAJE AL NORTE
INICIO DEL VIAJE A ANDALUCÍA
FIN DEL VIAJE A ANDALUCÍA
FIN DEL LAS CLASES
INICIO DE EXÁMENES
FIN DE EXÁMENES
SALIDA DE ESPAÑA Y FIN DEL PROGRAMA
Fin del Curso Intensivo
Inicio del viaje a Madrid
Fin del viaje a Madrid
Cena de Thanksgiving
Inicio de clases
último día de clases
llegada a Salamanca
Inicio del viaje a Galicia
To allow for maximum interaction and immersion in the Salamanca community and the Spanish language, all students live with Spanish families that have been carefully selected by the housing office of the University of Salamanca. (Students may not arrange for their own accommodations, nor make any changes in their residence without the permission of the program director. The home-stay is considered an essential element of the WFU in Salamanca program, and all accommodations must be properly approved.) These homestays immerse the students in the local community and provide them with the opportunity to practice their Spanish.
<html><p><span>Adecco S.A. is a Global Fortune 500 company and the world leader in workforce solutions. Adecco connects over 700,000 associates with business clients each day through its network of over 33,000 employees and 6,600 offices in over 70 countries and territories around the world. Registered in Switzerland, and managed by a multinational team with expertise in markets spanning the globe, Adecco delivers an unparalleled range of flexible staffing and career resources to corporate clients and qualified associates.</span><span lang="en-gb"><span> </span></span><span> 		</span><span lang="EN-GB" style=""><span> 		</span><o:p><span> &nbsp;</span><br /><span> 		</span></o:p></span><span>         </span><span lang="EN-GB" style=""><span>Students wishing to intern with Adecco will meet a small and friendly team in the office in Salamanca. You will help them welcoming </span></span><span lang="en-gb"><span>candidates by collecting their curricula and having an initial interview, where the objective is to filter profiles. You will also speak with those candidates about the conditions and characteristics of available jobs. Other duties are evaluations of candidates through Expert tests, collaborating with the team in the day to day work, recruitment of candidates, in the different sources: Associations, programs of labor insertion, websites: Adecco.es, Infojobs, infoempleo&hellip;</span></span></p><span> 	</span><p><span lang="EN-GB" style=""><span>&nbsp;</span></span><span lang="EN-GB" style=""><o:p><img width="564" vspace="6" hspace="6" height="190" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/adecco.jpg" alt="ADECCO" v:shapes="_x0000_s1048" /></o:p></span></p></html>
/***
|Name|AdvancedOptionsPlugin|
|Source|http://www.TiddlyTools.com/#AdvancedOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#AdvancedOptionsPlugin|
|Version|1.1.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.3|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|automatically add plugin-defined options to the [[AdvancedOptions]] shadow tiddler|
!!!!!Usage
<<<
At document startup, this plugin examines each tiddler tagged with <<tag systemConfig>> and looks for a tiddler slice named "Options" whose value refers to a tiddler section (or separate tiddler) that contains an 'advanced options control panel' for configuring that plugin's features and behavior.  For each plugin that contains an "Options" slice, a tabbed entry is automatically created in the [[AdvancedOptions]] shadow tiddler to display that plugin's control panel.

As an optional fallback for backward-compatibility with plugin tiddlers that do not define the "Options" slice, this plugin will also look for a section heading named "Configuration" within those tiddlers, so that older plugins that define this section can automatically have their settings added to the [[AdvancedOptions]] tiddler without requiring the "Options" slice to be added.
<<<
!!!!!Configuration
<<<
<<option chkAdvancedOptions>> automatically add plugin-defined options to the [[AdvancedOptions]] shadow tiddler
<<option chkAdvancedOptionsBackstage>> automatically add plugin-defined options to Backstage menu
<<option chkAdvancedOptionsFallback>> use <<option txtAdvancedOptionsFallback>> section as a fallback for plugins that don't define an ~AdvancedOptions slice
//note: these settings only take effect after reloading the document//
<<<
!!!!!Revisions
<<<
2008.05.09 [1.1.0] add "options" panel to backstage
2008.04.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.AdvancedOptionsPlugin= {major: 1, minor: 1, revision: 0, date: new Date(2008,5,9)};

if (config.options.chkAdvancedOptions===undefined)
	config.options.chkAdvancedOptions=true;
if (config.options.chkAdvancedOptionsBackstage===undefined)
	config.options.chkAdvancedOptionsBackstage=true;
if (config.options.chkAdvancedOptionsFallback===undefined)
	config.options.chkAdvancedOptionsFallback=true;
if (config.options.txtAdvancedOptionsFallback===undefined)
	config.options.txtAdvancedOptionsFallback="Configuration";
if (config.optionsDesc) config.optionsDesc.chkAdvancedOptions=
	"automatically add plugin-defined options to [[AdvancedOptions]]";

var items=[];
var fmt="[[%0 ]] [[view options for %0]] [[%1]]\n";
var section=config.options.txtAdvancedOptionsFallback;
var plugins=store.getTaggedTiddlers("systemConfig");
for (var p=0; p<plugins.length; p++) {
	var tid=plugins[p].title;
	var settings=store.getTiddlerSlice(tid,"Options");
	if (!settings && config.options.chkAdvancedOptionsFallback && store.getTiddlerText(tid+"##"+section))
		settings="##"+section; // fallback handling for older plugins
	if (settings&&settings.length) {
		if (settings.substr(0,2)=="##") settings=tid+settings;
		items.push(fmt.format([tid,settings]));
	}
}
if (items.length) config.shadowTiddlers.PluginOptions=
	"!!![[Plugin-defined options|PluginManager]]\n@@text-align:left;<<tabs '' \n"+items.join(' ')+">>@@";

if (config.options.chkAdvancedOptions)
	config.shadowTiddlers.AdvancedOptions+="{{smallform{{{wrap{<<tiddler PluginOptions>>}}}}}}";

// add "options" backstage task
if (config.tasks && config.options.chkAdvancedOptionsBackstage) { // for TW2.2b3 or above
	config.tasks.options = {
		text: "options",
		tooltip: "manage plugin-defined option settings",
		content: "{{smallform{{{groupbox{{{wrap{<<tiddler PluginOptions>>}}}}}}\n{{groupbox small {<<options>>}}}}}}"
	}
	config.backstageTasks.splice(config.backstageTasks.indexOf("plugins")+1,0,"options");
}
//}}}
Students wishing to apply for this program must complete the WFU Salamanca Program application by March 1 for the Fall semester and by October 1 for the Spring semester.
To clarify:
Semester of Study Application Deadline
*Spring 2009 October 1, 2008 
*Fall 2009 March 1, 2009

Completed applications must be returned to the Department of Romance Languages, Wake Forest University, 323 Greene Hall, Winston-Salem, NC 27109.

Applications can be obtained by writing to the Department of Romance Languages, by sending an email to the program coordinator (galacs@wfu.edu) or from the website link - Application Form.

Applications from other institutions are welcomed and encouraged.
Tucked in Spain's Northeast corner, with its thriving port and beautiful beaches lining the Mediterranean, its eyes looking out towards France and Italy, Barcelona has a uniquely European and cosmopolitan feel. Spain's second largest city, Barcelona is Madrid's eternal rival, but its chic art and architecture, coastal ambiance and the fierce regionalism of its Catalan people make it a very different place. Here you will stroll down the beautiful avenue of Las Ramblas lined with street vendors and performers, detour into the city's medieval Gothic Quarter and stop to see one of Europe's most distinctive structures at la Iglesia de la Sagrada Familia, Gaudí's masterpiece and whimsical icon of this distinct city. The modern art continues at the Dalí museum, a bizarre monument to one of Spain's most celebrated and peculiar geniuses. From its avant-garde art to the sound of Catalan spoken on the street to its proud defiance of typical Spanish clichés, Barcelona offers all the culture of a giant city with a very particular twist.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/barcelona.jpg]]
Documents
· Get/renew your passport, if necessary. Go to http://www.travel.state.gov/passport_services.html for information, including the location of the application site nearest you. You will need to submit passport photos with the paperwork.
· Obtain a semester or year long academic visa, see instructions on the Spanish consulate homepage at www.spainemb.org.
· Get an International Student Identity Card from the Office of International Studies or from http://www.counciltravel.com/. It costs about $20 and you will need another passport-sized photo. You will need it for special student deals when buying your plane tickets or rail passes in the US, and you can present it for student discounts in Spain.
· Make copies of all forms of identification. Leave one copy at home, take one copy with you. Make multiple copies of your passport. One to leave in the states, one to leave in your casa, one to carry for ID, and a couple in case your Wake professor needs them.
· Bring your driver's license if you plan on renting a car, but leave other forms of ID at home. Most cars available will have manual, not automatic transmission. You can rent cars with automatic transmission only at the Madrid airport if you reserve it some time ahead. In Salamanca you can find a place (AVAL) to rent cars if you are over 21 years old. Other places will generally ask you to be almost 23.
· Bring a few extra passport-size photos if you have them, or you can have them taken cheaply in one of the photo shops on the Rúa Mayor. Your professors will probably ask for pictures of you to learn your names when classes begin and it's really nice to have them on hand.

Medical Needs
· If you take prescription medication, buy enough to last through your stay. Bring an extra pair of glasses or contact lenses.
/***
|Name|BreadcrumbsPlugin|
|Author|Eric Shulman|
|Source|http://www.TiddlyTools.com/#BreadcrumbsPlugin|
|Documentation|http://www.TiddlyTools.com/#BreadcrumbsPluginInfo|
|Version|2.0.0|
|License|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.displayTiddler,TiddlyWiki.prototype.deleteTiddler|
|Options|##Configuration|
|Description|list/jump to tiddlers viewed during this session plus "back" button/macro|
This plugin provides a list of links to all tiddlers opened during the session, creating a "trail of breadcrumbs" from one tiddler to the next, allowing you to quickly navigate to any previously viewed tiddler, or select 'home' to reset the display to the initial set of tiddlers that were open at the start of the session (i.e., when the document was loaded into the browser).
!!!!!Documentation
<<<
see [[BreadcrumbsPluginInfo]]
<<<
!!!!!Configuration
<<<
<<option chkCreateDefaultBreadcrumbs>> automatically create breadcrumbs display (if needed)
<<option chkShowBreadcrumbs>> show/hide breadcrumbs display
<<option chkReorderBreadcrumbs>> re-order breadcrumbs when visiting a previously viewed tiddler
<<option chkBreadcrumbsHideHomeLink>> omit 'Home' link from breadcrumbs display
<<option chkShowStartupBreadcrumbs>> show breadcrumbs for 'startup' tiddlers
<<option chkBreadcrumbsReverse>> show breadcrumbs in reverse order (most recent first)
<<option chkBreadcrumbsLimit>> limit breadcrumbs display to {{twochar{<<option txtBreadcrumbsLimit>>}}} items
<<option chkBreadcrumbsLimitOpenTiddlers>> limit open tiddlers to {{twochar{<<option txtBreadcrumbsLimitOpenTiddlers>>}}} items

<<<
!!!!!Revisions
<<<
2008.05.01 [2.0.0] added 'limit open tiddlers' feature (with safety check for tiddler in edit mode)
| Please see [[BreadcrumbsPluginInfo]] for previous revision details |
2006.02.01 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.breadCrumbs = {major: 2, minor: 0, revision: 0, date: new Date("May 1, 2008")};

var co=config.options; // abbreviation

// show/hide display option (default is to SHOW breadcrumbs)
if (co.chkShowBreadcrumbs===undefined) co.chkShowBreadcrumbs=true;

// REORDER breadcrumbs when visiting previously viewed tiddler (default)
if (co.chkReorderBreadcrumbs===undefined) co.chkReorderBreadcrumbs=true;

// create default breadcrumbs display as needed (default is to CREATE)
if (co.chkCreateDefaultBreadcrumbs===undefined) co.chkCreateDefaultBreadcrumbs=true;

// show breadcrumbs for 'startup' tiddlers (default is FALSE = only show crumbs for tiddlers opened after startup)
if (co.chkShowStartupBreadcrumbs===undefined) co.chkShowStartupBreadcrumbs=false;

// show crumbs in reverse order (most recent first)
if (co.chkBreadcrumbsReverse===undefined) co.chkBreadcrumbsReverse=false;

// limit number of crumbs displayed
if (co.chkBreadcrumbsLimit===undefined) co.chkBreadcrumbsLimit=false;
if (co.txtBreadcrumbsLimit===undefined) co.txtBreadcrumbsLimit=5;

// limit number of open tiddlers
if (co.chkBreadcrumbsLimitOpenTiddlers===undefined) co.chkBreadcrumbsLimitOpenTiddlers=false;
if (co.txtBreadcrumbsLimitOpenTiddlers===undefined) co.txtBreadcrumbsLimitOpenTiddlers=3;

// omit home link from breadcrumbs display
if (co.chkBreadcrumbsHideHomeLink===undefined) co.chkBreadcrumbsHideHomeLink=false;

config.macros.breadcrumbs =  {
	crumbs: [], // the list of current breadcrumbs
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var area=createTiddlyElement(place,"span",null,"breadCrumbs",null);
		area.setAttribute("homeSep",params[0]?params[0]:this.homeSeparator); // custom home separator
		area.setAttribute("crumbSep",params[1]?params[1]:this.crumbSeparator); // custom crumb separator
		this.render(area);
	},
	add: function (title) {
		var thisCrumb = title;
		var ind = this.crumbs.indexOf(thisCrumb);
		if(ind === -1)
			this.crumbs.push(thisCrumb);
		else if (config.options.chkReorderBreadcrumbs)
			this.crumbs.push(this.crumbs.splice(ind,1)[0]); // reorder crumbs
		else
			this.crumbs=this.crumbs.slice(0,ind+1); // trim crumbs
		if (config.options.chkBreadcrumbsLimitOpenTiddlers)
			this.limitOpenTiddlers();
		this.refresh();
		return false;
	},
	getAreas: function() {
		var crumbAreas=[];
		// find all DIVs with classname=="breadCrumbs"
		// Note: use try/catch to avoid "Bad NPObject as private data" fatal error  caused when
		// some versions of embedded QuickTime player element is accessed by hasClass() function.
		var all=document.getElementsByTagName("*");
		for (var i=0; i<all.length; i++)
			try{ if (hasClass(all[i],"breadCrumbs")) crumbAreas.push(all[i]); } catch(e) {;}
		// find single DIV w/fixed ID (backward compatibility)
		var byID=document.getElementById("breadCrumbs")
		if (byID && !hasClass(byID,"breadCrumbs")) crumbAreas.push(byID);
		if (!crumbAreas.length && config.options.chkCreateDefaultBreadcrumbs) {
			// no existing crumbs display areas... create one...
			var defaultArea = createTiddlyElement(null,"span",null,"breadCrumbs",null);
		 	defaultArea.style.display= "none";
			var targetArea= document.getElementById("tiddlerDisplay");
		 	targetArea.parentNode.insertBefore(defaultArea,targetArea);
			crumbAreas.push(defaultArea);
		}
		return crumbAreas;
	},
	refresh: function() {
		var crumbAreas=this.getAreas();
		for (var i=0; i<crumbAreas.length; i++) {
			crumbAreas[i].style.display = config.options.chkShowBreadcrumbs?"block":"none";
			removeChildren(crumbAreas[i]);
			this.render(crumbAreas[i]);
		}
	},
	render: function(here) {
		var out=""
		var homeSep=here.getAttribute("homeSep"); if (!homeSep) homeSep=this.homeSeparator;
		var crumbSep=here.getAttribute("crumbSep"); if (!crumbSep) crumbSep=this.crumbSeparator;
		if (!config.options.chkBreadcrumbsHideHomeLink) {
			createTiddlyButton(here,"Home",null,this.home,"tiddlyLink tiddlyLinkExisting");
			out+=homeSep;
		}
		for (c=0; c<this.crumbs.length; c++) // remove non-existing tiddlers from crumbs
			if (!store.tiddlerExists(this.crumbs[c]) && !store.isShadowTiddler(this.crumbs[c]))
				this.crumbs.splice(c,1);
		var count=this.crumbs.length;
		if (config.options.chkBreadcrumbsLimit && config.options.txtBreadcrumbsLimit<count)
			count=config.options.txtBreadcrumbsLimit;
		var list=[];
		for (c=this.crumbs.length-count; c<this.crumbs.length; c++) list.push('[['+this.crumbs[c]+']]');
		if (config.options.chkBreadcrumbsReverse) list.reverse();
		out+=list.join(crumbSep);
		wikify(out,here);
	},
	home: function() {
		story.closeAllTiddlers();
		restart();
		config.macros.breadcrumbs.crumbs = [];
		var crumbAreas=config.macros.breadcrumbs.getAreas();
		for (var i=0; i<crumbAreas.length; i++) crumbAreas[i].style.display = "none";
		return false;
	},
	limitOpenTiddlers: function() {
		var limit=config.options.txtBreadcrumbsLimitOpenTiddlers; if (limit<1) limit=1;
		for (c=this.crumbs.length-1; c>=0; c--) {
			var tid=this.crumbs[c];
			var elem=document.getElementById(story.idPrefix+tid);
			if (elem) { // tiddler is displayed
				if (limit <=0) { // display limit has been reached
					if (elem.getAttribute("dirty")=="true") { // tiddler is being edited
						var msg="'"+tid+"' is currently being edited.\n\n";
						msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
						if (confirm(msg)) { story.saveTiddler(tid); story.closeTiddler(tid); }
					}
					else
						story.closeTiddler(this.crumbs[c]);
				}
				limit--;
			}
		}
	}
};
if (config.macros.breadcrumbs.homeSeparator==undefined) // note: not a cookie
	config.macros.breadcrumbs.homeSeparator=" | ";
if (config.macros.breadcrumbs.crumbSeparator==undefined)  // note: not a cookie
	config.macros.breadcrumbs.crumbSeparator=" > ";

config.commands.previousTiddler = {
	text: 'back',
	tooltip: 'view the previous tiddler',
	hideReadOnly: false,
	dateFormat: 'DDD, MMM DDth YYYY hh:0mm:0ss',
	handler: function(event,src,title) {
		var here=story.findContainingTiddler(src); if (!here) return;
		var crumbs=config.macros.breadcrumbs.crumbs;
		if (crumbs.length>1) {
			var crumb=crumbs[crumbs.length-2];
			story.displayTiddler(here,crumb);
		}
		else
			config.macros.breadcrumbs.home();
		return false;
	}
};

config.macros.previousTiddler= {
	label: 'back',
	prompt: 'view the previous tiddler',
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var label=params.shift(); if (!label) label=this.label;
		var prompt=params.shift(); if (!prompt) prompt=this.prompt;
		createTiddlyButton(place,label,prompt,function() {
			var crumbs=config.macros.breadcrumbs.crumbs;
			if (crumbs.length>1) {
				var crumb=crumbs[crumbs.length-2];
				story.displayTiddler(place,crumb);
			}
			else
				config.macros.breadcrumbs.home();
		});
	}
}

// hijack story.displayTiddler() so crumbs can be refreshed when a tiddler is displayed
if (Story.prototype.breadCrumbs_coreDisplayTiddler==undefined)
	Story.prototype.breadCrumbs_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
	var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
	this.breadCrumbs_coreDisplayTiddler.apply(this,arguments);
	// if not displaying tiddler during document startup, then add it to the breadcrumbs
	// note: 'startingUp' flag is a global, set/reset by the core init() function
	if (!startingUp || config.options.chkShowStartupBreadcrumbs) config.macros.breadcrumbs.add(title);
}

// hijack store.removeTiddler() so crumbs can be refreshed when a tiddler is deleted
if (TiddlyWiki.prototype.breadCrumbs_coreRemoveTiddler==undefined)
	TiddlyWiki.prototype.breadCrumbs_coreRemoveTiddler=TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler= function(title)
{
	this.breadCrumbs_coreRemoveTiddler.apply(this,arguments);
	config.macros.breadcrumbs.refresh();
}
//}}}
<html><img align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/info_clip_image002.jpg" alt="" /></html><html><p><span style="font-size: larger;"><strong>2008-2009</strong></span></html>[[Fall 2008]]  -  [[Spring 2009]] 
[[Fall 2009]]<html><p><strong>NOTE:</strong><br />These dates are subject to change due to availability in hotels and transportation, reservations, etc.</p></html>
<html><object align="right" width="425" height="344"><param name="movie" value="http://www.youtube.com/v/YPZv7PqaHNU&hl=es&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/YPZv7PqaHNU&hl=es&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></html>''Location''
Salamanca is a beautiful, thriving university town, approximately two hours from Madrid. Students are drawn to this city not only for its beautiful architecture, but also for its lively social atmosphere. Designated as a Cultural Capital of Europe in 2002, Salamanca provides a wonderful ambience for students from all over the world. From the Plaza Mayor to the Catedral Nueva to the Casa de las Conchas, Salamanca will not fail to impress. The rest of Spain is easily accessible from Salamanca. Santiago de Compostela, Sevilla, Madrid, and Barcelona are a few of the cities that students enjoy visiting.
The Wake Forest program is based at the University of Salamanca, one of the oldest and most prestigious universities in Europe. Some of the university buildings date from 1254, and the library is famous for having over 2,800 ancient manuscripts. The quality of the courses and the reputation of the faculty at the University of Salamanca are outstanding.

Click on the links below for information: 
*''[[Online Picture Tour of Salamanca:|http://www.flickr.com/groups/salamanca/pool/show/]]''
*''[[Important places in Salamanca:|http://maps.google.es/maps/ms?ie=UTF8&hl=es&t=h&msa=0&msid=108184080323167150547.00046059819b47b86933f&z=14]]''
*''[[About Salamanca:|http://www.aboutsalamanca.com]]'' 
*''[[Tribuna de Salamanca (newspaper):|http://www.tribuna.net]]'' 
*''[[La Gaceta de Salamanca (newspaper):|http://www.lagacetadesalamanca.com/]]'' 
*''[[University of Salamanca:|http://www.usal.es]]''
The Wake Forest program consists of specially-designed classes, taught by both University of Salamanca professors and the Wake Forest program director. Since the only students are you and your fellow program members, classes are very small. 

There is also the option of enrolling in regular classes with Spanish students, (PEI courses) which can give a new perspective on the true university experience in Spain. If you have taken a few higher level Spanish classes and your Spanish is strong enough, you may want to consider enrolling in at least one regular university class. Be aware that they will be much larger and probably not taught in the same way as your specialized classes. If you are interested in these classes, you should talk with your program director as soon as possible about your interest, since s/he will need time to investigate what is available and what fits with your schedule. But be forewarned that it is sometimes nearly impossible to fit these classes in with your schedule. None of the students in the Spring 2003 program could make them work, so don't count on having them to transfer for your non Spanish majors.

Another possibility for learning in a practical setting is an internship, which you can do for credit. If you are interested in internships, again, tell your program director early on, so that s/he can help you arrange one. Remember that internships count towards graduation, but not for the major or minor in Spanish.

There are a number of libraries throughout the city, which you can use for study and research. Using a library in Salamanca is much, much more difficult than in the US. In most, you must fill out a form in order for the librarian to bring you a book and let you look at it in the library (most do not have open stacks); if you want to check it out, you have to fill out another form. In order to check books out, you need to get a library card; bring your Salamanca student ID, your passport, and a passport-sized photo to the Biblioteca de Filología. Most libraries will only allow you to take out four books at a time (if that) for a few days (if that). In general, the Biblioteca de Geografía e Historia is a little easier to use than Filología, since it is smaller and more manageable. Use the computer system to look up books; the computer system searches the whole university library system, so make sure the book you're looking for is in a library that you know. (If it's not in Filología or Historia, it's probably not worth trekking across town for.) The central university library, Santa María de los Ángeles, on Calle Libreros, is a good place for finding reference books and has a nice study atmosphere, but you can't check any books out of it.
<html><!--[if !vml]--><span>         </span><img width="256" hspace="12" height="193" align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image006.jpg" v:shapes="_x0000_s1029" alt="" /><span>         </span><!--[endif]--><span lang="EN-GB" style=""><span>This is new internship opportunity where Interns will assist as <a href="javascript:;" title="The tiddler 'English-Spanish-English' doesn't yet exist" class="tiddlyLink tiddlyLinkNonExisting" refresh="link" tiddlylink="English-Spanish-English">English-Spanish-English</a> interpreters in general medicine consultations between the physician and the large number of international students who come to </span><st1:city w:st="on"><span>Salamanca</span></st1:city><span> in the summer to learn Spanish at the </span><em><span>Cursos Internacionales </span></em><span>offered by the </span><st1:place w:st="on"><st1:placetype w:st="on"><span>University</span></st1:placetype><span> of </span><st1:placename w:st="on"><span>Salamanca</span></st1:placename></st1:place><span>. Inters will also have the opportunity to assist to consultations related to sports medicine.</span></span></html>
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
For local and long-distance calls, expect to use public telephones or your cell phone (if you have a flat rate). For calls within Spain, you can use coins or you can buy a prepaid card from any tobacco shop. You will also want to buy prepaid calling cards for calling to the states. Eurocity gives the most minutes for your money and can be used for calls within Spain and out of Spain. There is a little tobacco store on the way to class just down the road from Mandala where you can buy phone cards easily in between classes. You can easily use these cards in the pay phones around town.

NOTE: As of Fall 2006, you will have the chance to purchase a contract with a cell phone company to use during the program!

Cell phones, or móviles, as they are called, are all the rage in Spain, especially among students. Be aware that making calls to a cell phone can be very expensive. They can be useful for making calls to friends within Salamanca, but are not the best deal for making calls from the US. I suggest that students should have cell phones because it is the only way to communicate between students.

Cell phone plans are different in Spain than they are in the US. You do not buy a certain number of minutes per month. Instead you buy phone cards to recharge your phone. You can buy these cards in tobacco stores and in the stores of the different phone companies (Movistar, Orange, Vodafone, Yoigo) When choosing your plan, keep in mind that no one company is dominant, so you will probably be calling phones on different plans. As you use up your minutes, you can buy cards for more.

Wake Forest found in fall 2006 a cell phone plan that almost fits perfectly for you at Apelcom. This company offers special plans for foreign students in Spain. Find more info at http://www.apelcomcell.net/. If you don't like their rates you can always look for an adequate cell phone plan at http://www.phonehouse.es/. They deal with all the Spanish phone companies and they have a store next to the WF Center.

There are a number of places where you can use the Internet. Your director will provide you with a cash stipend to use these facilities. Take advantage of the free Internet offered through the University. There are many Internet cafes around town. Find your favorites! Also … WFU Center.

You can buy stamps at any estanco store; just tell the clerk whether it's for a letter or postcard, and whether you're sending it within Spain or out of the country. You can also buy stamps at the yellow post office branches around town. There are several letter drop boxes around town (called buzones), often green or yellow, with the post office symbol on them. 
<html><span>       </span><p><!--[if !vml]--><span>         </span><img width="266" vspace="6" hspace="12" height="133" align="left" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image004.jpg" alt="Salamanca Clay Formacion" v:shapes="_x0000_s1028" /><span>         </span><!--[endif]--><span>         </span><span lang="EN-GB" style=""><span>Clay Formaci&oacute;n Internacional S.L. is a firm, a spin-off of the </span><st1:place w:st="on"><st1:placetype w:st="on"><span>University</span></st1:placetype><span> of </span><st1:placename w:st="on"><span>Salamanca</span></st1:placename></st1:place><span>, which offers consulting services in Information Technologies. Students wishing to intern with Clay Formaci&oacute;n will be interviewed to ascertain their social, communicative and customer service skills. Clay Formaci&oacute;n offers one internship in each of the two summer sessions. The main aspect of the intern&rsquo;s work will center on dealings with potential international customers for the sale of products related with education in new technologies.</span></span></p></html>
<html><p><span style="font-family: Arial;"><span style="font-size: medium;">Brian L. Price, Ph.D.<br />     Program Director [[Spring 2009]]<br /> Assistant Professor of Spanish<br /> Wake Forest University<br /> P.O. Box 7566, Winston-Salem, NC 27109<br /> 336.758.4572 (office)<br /> 336.758.4432 (fax)<br />   Email: </span></span><a href="mailto:pricebl@wfu.edu"><span style="font-family: Arial;"><span style="font-size: medium;">pricebl@wfu.edu</span></span></a></p><hr /><p><span style="font-size: medium;"><span style="font-family: Arial;">Dr. Jane Albrecht<br />Program Director [[Fall 2009]]<br />Associate Professor of Spanish<br />Office: Greene 520<br />Wake Forest University<br />336.758.5468(office)<br />336.758.4432 (fax)<br />Email: <a href="javascript:location.href='mailto:'+String.fromCharCode(97,108,98,114,101,99,104,116,64,119,102,117,46,101,100,117)+'?'">albrecht@wfu.edu</a><br /></span></span>&nbsp;</p><hr /><p><span style="font-family: Arial;"><span style="font-size: medium;"> Dr. Candelas Gala <br />  Program Coordinator <br />  323 Greene Hall <br />  Winston-Salem, NC 27109 <br />  Tel: (336) 758-5485; (336) 758-4206 <br />  Fax: (336) 758-4432 <br />      Email: </span></span><font face="Bell MT"><a href="mailto:galacs@wfu.edu"><span style="font-family: Arial;"><span style="font-size: medium;">galacs@wfu.edu</span></span></a></font><a href="mailto:petersjr@wfu.edu"><span style="font-family: Arial;"><span style="font-size: medium;"><br />      </span></span></a></p><p><span style="font-family: Arial;"><span style="font-size: medium;">&nbsp;</span></span></p><p><span style="font-family: Arial;"><span style="font-size: medium;"><b>For more information on admissions and       tuition please visit the Wake Forest University website:</b><br />      </span></span><font face="Bell MT"><a set="yes" linkindex="0" href="http://www.wfu.edu/"><span style="font-family: Arial;"><span style="font-size: medium;">http://www.wfu.edu/</span></span></a> </font></p></html>
As an official Wake Forest program, Salamanca is considered an "alternate campus" of WFU and program cost is based directly on the current costs of tuition, room and board on the Wake Forest University campus. (Non-Wake Forest students should consult the WFU Admissions webpage: http://www.wfu.edu/ ). Scholarships can be applied to the cost of the program. The total amount covers:

*Roundtrip Airfare (up to $1300)
*Tuition and Academic Fees
*Full Room and Board (all meals)
*Student Health Insurance
*Email Access
*All Group Excursions
*All Books
*Laundry
<html><span>       </span><p><span lang="EN-GB" style=""><o:p></o:p></span></p><span>       </span><p><!--[if !vml]--><span>         </span><!--[endif]--><span>         </span><strong><span lang="EN-GB" style=""><span lang="EN-GB" style=""><img width="155" vspace="6" hspace="6" height="207" align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/sida.jpg" alt="EstivalTour" v:shapes="_x0000_s1047" /></span></span></strong><span lang="EN-GB" style=""><span>In C&aacute;ritas Salamanca you will work closely with people affected by AIDS. This internship is only thought for students with a great sense of charity. At C&aacute;ritas you will help giving information and accompanying patients and their families, in the process of illness and death. You will also help them in their social and labour insertion. At the hospital you will take turns with the family helping them to take the necessary rest. You will also help the family improve poor relationships with the patient. Your presence will be much appreciated at the &ldquo;House home&rdquo;, a shelter for those who have no alternative housing and / or need permanent care.</span></span></p></html>
Our trip to the Andalucian city of Córdoba will take us to the Mezquita or Great Mosque at Córdoba, one of the world's greatest works of Islamic architecture. Córdoba will transport you back to the era of Al-Andalus, the Arab empire that ruled Southern Spain for 7 centuries and flourished as Europe's most advanced medieval civilization. When Paris and London were small towns, Córdoba stood as the Continent's most advanced city, a metropolis of 300 mosques, numerous luxurious palaces and the world's greatest libraries. Visit the city's quaint "judería" or Jewish quarter with its whitewashed houses, bright flowers and quiet courtyards. Enjoy a gazpacho and sangría in the Southern sun as you acclimate to a different world, a place forever marked by the beauty and genius of ancient Islamic arts and science.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/cordoba_la_mezquita.jpg]]
[[Overview]]
Spring and Fall semesters. Students may apply for either semester or for both. The Spring semester will run from the middle of January to the beginning of May, and the Fall semester will run from approximately the first week in September through the first of December. More specific dates will be posted soon, or you can contact the coordinator through contact information.
<<tiddler Calendar>>
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
Our travels will take us to the unforgettable, awe-inspriring 16th Century monastery of the Escorial. Raised in 1563 as a monument to his father Charles V, the Escorial stands as an icon of the Spanish Empire and its audacios grandiosity. Not far from Madrid near an obscure town
this overwhelming construction encompasses a palace, royal pantheon and mausoleum, basilica and library. Its enormous installations include 15 cloisters, 16 patios, 300 cells, 9 organs, 1600 paintings, 88 fountains and 2673 windows and 1200 doors. This is the paramount symbol of the Empire at its height and the massive power and wealth it wielded. Today, visiting it is an almost surreal glimpse at a time when Spain believed it was Divinely destined to and capable of ruling the world.
Take your camera, but no photo can capture the scope of this stunning creation.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/escorial.JPG]]
''Selection Criteria''
No particular major is required for eligibility. However, students 
*(1) should normally be of junior standing; *however, well qualified students are encouraged to apply to study in Salamanca during their sophomore year; 
*(2) must have completed one course beyond SPN 214, and 
*(3) should be approved by both their major Department and the Department of Romance Languages. Interested students should [[contact|Contact]] Professor Candelas Gala in the Romance Languages department.
The Salamanca program  maintains a rolling admission policy until the [[Application Deadlines]].

Students from other universities who wish to apply should contact their respective schools about credit transfers and other academic issues. [[Language recommendation form|http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/Salamanca_Language_recommendation.pdf]].
/%
|Name|EmbedTiddlers|
|Source|http://www.TiddlyTools.com/#EmbedTiddlers|
|Version|1.2.2|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|transclude a list of tiddlers in a specific order|

usage:
   <<tiddler EmbedTiddlers with: "TiddlerName [[TiddlerName with spaces]] TiddlerName ...">>
or
   <<tiddler EmbedTiddlers with: @TiddlerName>>
or
   <<tiddler EmbedTiddlers with: =tagValue sortby>>

where
	@TiddlerName
		specifies a //separate// tiddler containing the space-separated,
		bracketed list of tiddlers to transclude (e.g., DefaultTiddlers)
	=tagValue
		embeds all tiddlers tagged with the indicated value
	sortby (optional)
		specifies a tiddler field for sorting the results (default="title")
		"+" or "-" prefix indicates the sort direction (ascending/descending),
		e.g., "-modified" sorts by tiddler modification date, most recent first

Note: if MatchTagsPlugin is installed, you can use FULL BOOLEAN LOGIC EXPRESSIONS
in place of the "tagValue" (following the leading "=").  However, because the boolean
expression will contain spaces, it MUST be enclosed in [[...]], like this:

<<tiddler EmbedTiddlers with: [[=settings AND NOT systemConfig]]>>

%/<script>
	var list='$1';
	var sortby='title'; if ('$2'!='$'+'2') sortby='$2';
	var tids=[];
	if (list.substr(0,1)=='=') {
		var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
		var tagged=store.sortTiddlers(fn.apply(store,[list.substr(1)]),sortby);
		for (var t=0; t<tagged.length; t++) tids.push(tagged[t].title);
	} else {
		if (list.substr(0,1)=='@') list=store.getTiddlerText(list.substr(1),'');
		var tids=list.readBracketedList();
	}
	var out='';
	for (var i=0; i<tids.length; i++) out+='<<tiddler [['+tids[i]+']]>>';
	return out;
</script>
<html><p><img width="164" vspace="6" hspace="12" height="124" align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image008.jpg" v:shapes="_x0000_s1030" alt="" /><span><span><p><span>Students visit local schools on a regular basis in order to assist in English language classes. Schools available include elementary and high school levels.</span><br /><span> Students may work with their school to arrange a mutually convenient time, though Friday participation may be necessary if students have schedule conflicts due to classes.</span><span>This option represents an excellent opportunity for those interested in foreign language education or education in general.</span></p></span></span></p><p><strong><span>Public Kindergarten and Elementary School / Colegio P&uacute;blico de Educaci&oacute;n Infantil y Primaria (Santa Catalina)</span></strong></p><p><span>       </span></p><p><!--[if !vml]--><span>&nbsp;</span><span>         </span><!--[endif]--><span>         </span><span lang="EN-GB" style=""><span>This internship site is highly recommended for future teachers as interns will be immersed in daily classroom activities. It is also an excellent </span></span><span lang="EN-GB" style=""><span>site to improve the knowledge of Spanish as interns will be in constant contact with school children (5-10 years of age). They will also work closely with teachers and educators in the development of educational activities for the children, and will assist them during recess periods. A complementary activity will be the organization of the dining hall/cafeteria and assisting during meal time.</span></span></p></html>
<html><span>       </span><p><!--[if !vml]--><span>         </span><img width="305" vspace="6" hspace="6" height="38" align="left" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/estivaltour.jpg" alt="EstivalTour" v:shapes="_x0000_s1032" /><span>         </span><!--[endif]--><span>         </span><span lang="EN-GB" style=""><span>Viajes ESTIVALTOUR is one of the leading travel agencies in </span><st1:country-region w:st="on"><st1:place w:st="on"><span>Spain</span></st1:place></st1:country-region><span>. The group has over 200 offices across the </span><st1:place w:st="on"><span>Peninsula</span></st1:place><span>. Their large experience, almost a decade advising and recommending customers, is their best background. During the internship you will be part of a very familiar and small team of travel agents. Your duties will involve all daily activities in a travel agency such as answering calls, advising national and international customers, accounting, updating web pages, etc.</span></span></p></html>
Looking for activities besides classes, la marcha, and travel to fill your time? Unfortunately, the university bureaucracy can be absolutely maddening, and, predictably, getting involved in student organizations and student life can be difficult. Your best bet is to read the student newspaper (la Tribuna Universitaria) religiously, where you'll find announcements of different club activities. Also talk to Spanish students - they will be your best source of information. Ask your program director about specific interests - sports, music, volunteer work - but keep in mind that s/he will encounter just as much bureaucracy as you will.

Volunteer activities are hard to find in Salamanca. If you do want to get involved, you should get started early, since many organizations want volunteers to commit to serve at least three months. Ask your program director or host family for ideas; you can ask at the Cruz Roja or see what is offered by various churches (catholic or protestant).

There are many catholic churches around town. If you are looking for a nondenominational protestant church, there is one at 30 Paseo de la Estación that offers worship services and other opportunities for involvement, like Bible studies. Check the phone book for other churches, such as the Jehovah's Witnesses and Latter Day Saints. For non-Christian religious services, you may be able to find them in major cities like Madrid, but you will have a hard time finding them in Salamanca.

The best way of finding what you want is to ask other young people. Take advantage of the fact that you are in a city of more than 40,000 students - get to know some Spanish or other international students. Admittedly, it is difficult to "make friends," especially if you are only there for a semester, but there are many opportunities to practice your Spanish with other young people while getting to know some people outside of your circle of American friends. The easiest way to do this is through an intercambio - you will see small notices in the academic buildings from Spanish students who want to practice their English/German/French etc. with native speakers. You may want to put up a few of your own - you are practically guaranteed more than one response and others will take the initiative to contact you. List a few of your interests - sports, music, history, film, literature - so that you can find people who have more in common than just a desire to speak another language. Remember to exercise common sense and be safe - only put your phone or email address, NOT your street address. Meet in a public place, and go to a café for coffee and speak for half an hour in Spanish, half an hour in English. If for some reason you don't feel comfortable with your intercambio, or don't feel that you have much in common, you're under no obligation to meet again. Not every intercambio will work out perfectly, but keep trying - you will learn a lot and maybe even make a few friends in the bargain! You can find a lot of intercambios at the University website http://websou.usal.es/interlin/buscail.asp. 
/***
|''Name:''|FCKeditorPlugin|
|''Description:''|Wysiwyg editor for TiddlyWiki using FCKeditor.|
|''Version:''|1.1.1|
|''Date:''|Dec 21,2007|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demo:
On the plugin [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], see and edit [[WysiwygDemo]].
!Installation:
#download and unzip [[FCKeditor|http://www.fckeditor.net/download]] (by default, in a wiki subfolder, such that the relative path "fckeditor/fckeditor.js" is right).
#import [[FCKeditorPlugin]] (systemConfig tagged)
#add the following text to MarkupPreHead : {{{<script type="text/javascript" src="fckeditor/fckeditor.js"></script>}}}
#customize FCKeditorPath if needed (in MarkupPreHead and in options below)
#save and reload
#use the <<toolbar editHtml>> button in the tiddler's toolbar (in default ViewTemplate) or add {{{editHtml}}} command in your own toolbar.
! Useful Addons
*[[HTMLFormattingPlugin|http://www.tiddlytools.com/#HTMLFormattingPlugin]] to embed wiki syntax in html tiddlers.<<br>>//__Tips__ : When this plugin is installed, you can use anchor syntax to link tiddlers in wysiwyg mode (example : #example). Anchors are converted back and from wiki syntax when editing.//
*[[TaggedTemplateTweak|http://www.TiddlyTools.com/#TaggedTemplateTweak]] to use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values.
!Configuration options :
|FCKeditor folder (absolute or relative)|<<option txtFCKeditorPath>> |
|FCKeditor custom configuration script path (relative or absolute)<<br>>[[Example|fckeditor/editor/custom_config.js]] : {{{ fckeditor/editor/custom_config.js}}}|<<option txtFCKCustomConfigScript>>|
|Toolbar name ("Default", "Basic" or custom)<<br>>See [[FCKeditor documentation|http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Toolbar]] for more information on custom toolbars|<<option txtFCKToolbar>>|
|FCKeditor default height (if blank = 500px)|<<option txtFCKheight>>|
|Template called by the {{{wysiwyg}}} button|EditHtmlTemplate|
!Code
***/
//{{{
config.options.txtFCKeditorPath = config.options.txtFCKeditorPath ? config.options.txtFCKeditorPath : "fckeditor/";
config.options.txtFCKCustomConfigScript = config.options.txtFCKCustomConfigScript ? config.options.txtFCKCustomConfigScript : "";
config.options.txtFCKToolbar = config.options.txtFCKToolbar ? config.options.txtFCKToolbar : "";
config.options.txtFCKheight = config.options.txtFCKheight ? config.options.txtFCKheight : "500px";

config.macros.editHtml = {
	handler : function(place,macroName,params,wikifier,paramString,tiddler) {
		var field = params[0];
		var height = params[1] ? params[1] : config.options.txtFCKheight;
		if (typeof FCKeditor=="undefined"){
			displayMessage(config.macros.editHtml.FCKeditorUnavailable);
			config.macros.edit.handler(place,macroName,params,wikifier,paramString,tiddler);

		}
		else if (field) {
			var e = createTiddlyElement(null,"div");
			var fckName = "FCKeditor"+ Math.random();
			if(tiddler.isReadOnly())
				e.setAttribute("readOnly","readOnly");
			e.setAttribute("editHtml",field);
			if (height) e.setAttribute("height",height);
			e.setAttribute("fckName",fckName);
			place.appendChild(e);
			var fck = new FCKeditor(fckName);
			fck.BasePath = config.options.txtFCKeditorPath;
			if (config.options.txtFCKCustomConfigScript) fck.Config["CustomConfigurationsPath"] = config.options.txtFCKCustomConfigScript ;
			if (config.options.txtFCKToolbar) fck.ToolbarSet = config.options.txtFCKToolbar;
			fck.Height=height;
			var re = /^<html>(.*)<\/html>$/m;
			var fieldValue=store.getValue(tiddler,field);
			var htmlValue = re.exec(fieldValue);
			var value = (htmlValue && (htmlValue.length>0)) ? htmlValue[1] : fieldValue;
			value=value.replace(/\[\[([^|\]]*)\|([^\]]*)]]/g,'<a href="#$2">$1</a>');
			config.macros.editHtml.FCKvalues[fckName]=value;
			e.innerHTML = fck.CreateHtml();
		}
	},
        gather : function(e) {
            var name = e.getAttribute("fckName");
            var oEditor = window.FCKeditorAPI ? FCKeditorAPI.GetInstance(name) : null;
            if (oEditor) {
                        var html = oEditor.GetHTML();
			if (html!=null) 
                                    return "<html>"+html.replace(/<a href="#([^>]*)">([^<]*)<\/a>/gi,"[[$2|$1]]")+"</html>"; 
            }	
        },
	FCKvalues : {},
	FCKeditorUnavailable : "FCKeditor was unavailable. Check plugin configuration and reload."
}


window.FCKeditor_OnComplete= function( editorInstance ) {
        var name=editorInstance.Name;
	var value = config.macros.editHtml.FCKvalues[name];
	delete config.macros.editHtml.FCKvalues[name];
	oEditor = FCKeditorAPI.GetInstance(name);
	if (value) oEditor.SetHTML(value);
}

Story.prototype.previousGatherSaveEditHtml = Story.prototype.previousGatherSaveEditHtml ? Story.prototype.previousGatherSaveEditHtml : Story.prototype.gatherSaveFields; // to avoid looping if this line is called several times
Story.prototype.gatherSaveFields = function(e,fields){
	if(e && e.getAttribute) {
		var f = e.getAttribute("editHtml");
		if(f){
			var newVal = config.macros.editHtml.gather(e);
			if (newVal) fields[f] = newVal;
		}
		this.previousGatherSaveEditHtml(e, fields);
	}
};

config.shadowTiddlers.EditHtmlTemplate = config.shadowTiddlers.EditTemplate.replace(/macro='edit text'/,"macro='editHtml text'");

config.commands.editHtml={
	text: "wysiwyg",
	tooltip: "Edit this tiddler with a rich text editor",
	readOnlyText: "",
	handler : function(event,src,title) {
		clearMessage();
		var tiddlerElem = document.getElementById(story.idPrefix + title);
		var fields = tiddlerElem.getAttribute("tiddlyFields");
		story.displayTiddler(null,title,"EditHtmlTemplate",false,null,fields);
		return false;
	}
}

config.shadowTiddlers.ViewTemplate = config.shadowTiddlers.ViewTemplate.replace(/\+editTiddler/,"+editTiddler editHtml");

//}}}
''31 agosto:'' llegada a Salamanca  

''1-12 sept.:'' Curso Intensivo (lunes a viernes)  
''13-16 sept.:'' Viaje a Madrid (sábado a martes)  
''17 sept.:'' inicio del curso académico (miércoles)  
''5-12 oct.:'' Viaje a Andalucía (domingo a domingo)  
''30 oct-2 nov.'' Viaje a Galicia (jueves a domingo)  
27 nov. Cena de Thanksgiving  

''4 dic.:'' último día de clases (jueves)  

''Exámenes:''  
viernes 5, martes 9, miércoles 10, jueves 11 y viernes 12 de diciembre  
 
''13 diciembre:'' Salida para el aeropuerto de Madrid
<<calendar year:2008 month:7 numberMonths:5 numberColumns:3>>
|vertical-align:top;''ESTAS FECHAS PUEDEN SUFRIR ALGUNOS CAMBIOS DE ÚLTIMA HORA'' <<forEachTiddler where 'tiddler.tags.contains("FALL2009")' sortBy '("YYYY-0MM-0DD")' script 'function getFirstLine(s) {           var m = s.match(/\s*(.*)/);          return m != null && m.length >= 1 ? m[1] : "";}' write '"*[["+tiddler.title+"]] &rarr; "+getFirstLine(tiddler.text)+"\n"' >>| PLACE YOUR MOSE OVER THE HIGHLIGHTED DATES TO GET MORE INFORMATION<<calendar year:2009 month:7 numberMonths:5 numberColumns:3>> |
You will meet your host family as soon as you arrive in Salamanca. Relax! Everyone is a little nervous about the prospect of living with a new family, communicating in a foreign language, and adjusting to a different culture, but many students consider the homestay one of the most rewarding parts of their experience abroad.

Your host family is paid a certain amount of money to provide you with an individual room, a set of keys to the house, a hot shower, three meals a day, and laundry. Most families are used to hosting foreign students every year, so they won't expect you to be familiar with all Spanish customs or to speak Spanish fluently, and will help you adjust. Every family is different, so there is no formula for having a successful experience. However, here are some general tips that will ease your transition:

Communicate, from the minute you meet your host family. If you don't understand something or have a problem, ask about it. It may take a few tries, but have patience and don't give up. Always be honest about your likes and dislikes.

Ask about the house rules the very first day, and respect them. Since every family is different, don't assume anything - ASK.

Electricity, water, and telephone are all expensive utilities in Spain, much more so than in the U.S. Learn to use them sparingly - turn off the lights when you leave the room, and take short showers. However, you are paying for basic accommodations, so if there isn't hot water or sufficient heat in your room, talk to your host mother.

Since telephone use is very expensive, and most people are nervous about extra charges, don't be surprised if your family won't allow you to make any outgoing calls (even with a calling card, which is a foreign concept). Ask if/when you are allowed to receive calls, and teach the folks back home to say "(your name), por favor." Tell them to call at meal times, so you'll definitely be home, keeping in mind that Spain is six hours ahead of Eastern Standard Time. Most students acquire cell phones while in Salamanca. That’s the preferred way to be contacted by all your friends and family.

When you walk in the door, say a general "Hola" to let them know you are home (unless it is 5AM, of course). Say "Hasta luego" or "Me voy" upon leaving the piso.

Ask about mealtimes and let your host mother know if you won't be home for a meal.

Ask permission before using or borrowing things that are not your own (including food); respect your family's privacy. In the US, turning on the television or helping yourself from the fridge might be considered perfectly normal behaviour for a long-term guest, but in Spanish culture it can be seen as inappropriate if the family hasn't given you leave to do so.

Also respect the family's private space. How would you like to always have strangers invading your home! Read and study in your own room. When you're home, keep your door closed/cracked - this practice gives the family some privacy in their own home and lets you escape as well. But don't expect to be able to lock your bedroom door when you leave the piso. Your madre will need to get in your room to clean, change sheets, etc. Sometimes her housekeeping will involve your stuff being rearranged, especially with some of the more over-zealous madres. Unless your things are being stolen from you (in which case you should see your Wake director immediately), just accept it.

When you're home alone and the phone rings, answer it (say "Diga," not "Hola") and
take a message. If you feel uncomfortable doing this, ask your family.

Watching TV with your family is a great way to learn Spanish expressions and chat with the family about something other than the weather. Some families will also let you watch TV on your own; you can find lots of dubbed American movies on weeknights. Expect the TV to be on (and loud!) during every meal; most families have theirs right by the dinner table.

Entertaining at home is not typical in Spain - most people meet in a restaurant or bar. Don't assume that you will be allowed to bring friends over.

Cleanliness is often very important in the Spanish home. When you enter the piso, take off your shoes and put on a pair of slippers. Offer to help with basic chores; if they say no, don't feel that you have to insist, but offer anyway. Clean up after yourself; this may mean keeping your room cleaner than you would in the dorm at Wake Forest, but your family will appreciate it if you refrain from leaving mountains of dirty clothes in your bedroom and puddles of water on the bathroom floor.

Your madre will have a system set up for doing your laundry, but keep in mind that it may take time for her to get to it, especially in a larger family. If you have something that you want to wear the next day, you may want to take it to a laundrymat or drycleaners. A few families don't have big enough washers to wash piles of clothes so they may ask you to do all of your laundry at the laundrymat. This process is easy and fairly cheap usually $3 for a washer and $3 for a dryer. However, unlike in the states, they will do your wash for you. Ask your madre to take you the first time so you can learn the ropes.

Don't let problems go unresolved. If you feel uncomfortable or uncertain as to how to resolve a situation, talk to your program director. He or she will be able to advise you, help communicate your needs to your hosts and mediate, or help you change families if necessary.

Please do not be nervous! Living in a home that is not your own requires a period of adjustment, but you will be amazed by the improvements in your conversational Spanish. Have a sense of humour and don't be afraid to be yourself - you may discover that you and your host family have more in common than you ever could have imagined.
- Your ATM card from home is the standard, most convenient way to get money in Spain. (Find out what fees your bank charges for international ATM withdrawals. Fewer, larger withdrawals are normally cheaper than many small ones). Call ahead to let them know your travel pattern, so they don’t flag your account as fraudulent.
· Set up a system for monitoring your finances while abroad; most banks will now let you do it online, or make sure that someone at home can access your info and is keeping track of your statements. Establish a means ahead of time for someone at home to make deposits to your account if necessary.
· Buy a money belt to wear around your neck or waist, under your clothes.
· Budgeting. Prices in Spain are roughly comparable to those in the U.S. (with the exception of food and lodging, which tend to be a little cheaper). Most people end up spending between $1000 and $2000 during the course of the semester - this includes extra travel, buying clothes and supplies in Salamanca, and paying for drinks, snacks, and eating out.

Money

Spain is full of telebancos (ATMs) and you can usually find one that services PLUS or Cirrus cards. When you arrive in Salamanca and haven't had time to find your nearest ATM yet, you can find some inside or around the Plaza Mayor. The exchange rate is usually excellent; however, service fees vary for each bank, so you may want to call your bank before you leave the States and inquire about their fees for international withdrawals.

Credit cards are also accepted almost everywhere (several students have encountered problems finding places that accepted American Express). Credit cards can also be used in ATMs to make cash withdrawals. Call your credit card company to inquire about how they charge fees on cash withdrawals. Do not depend solely on a credit card because many establishments simply do no accept them. Also, if you are in a hurry, try to use cash because credit cards can sometimes take longer. If you plan on using your card in an ATM do not forget your PIN.

Traveler´s checks are increasingly hard to use. It is almost impossible to find banks that will cash them and they give you horrible exchange rates coupled with commission charges.

Always remember that banks in Spain close at 2:00 pm and do not reopen and only a select few are open on Saturdays.

Don't forget to bring something secure (like a money belt) to put your money in while traveling. Americans are particularly vulnerable to theft, and replacement credit and ATM cards may take as much as two weeks to arrive. 
Food: at home and on your own
Breakfast is typically light - some toast or cookies with a cup of hot chocolate or coffee. You'll eat before you go off to class in the morning. Lunch, or comida, is the big meal of the day. It's rare to eat before 2, and many families wait until 3. Everything shuts down between 2 and 5 in the afternoon, when everyone goes home for a big meal. Some families will serve a first course, primer plato, which usually is vegetarian, followed by segundo plato, some kind of meat or fish. Staple foods include tortilla española (a thick potato omelette), sausages, pork and chicken, lentils and beans, soup, potatoes, and the ever-present pan - crusty, baguette-style bread. Food is cooked with a lot of olive oil. The typical dessert is a piece of fruit or a small cup of yogurt. Dinner is a smaller meal, eaten around 9 or 10 at night, sometimes later.

Students are usually concerned about offending their families if they can't or don't want to eat the food that is offered. If they serve you heaping portions, simply explain that you don't eat much or are watching your weight, and you hate to see good food go to waste. (Spaniards as a rule are more sensitive to the concept of waste than Americans.) As far as food preferences go, the first rule goes back to the advice your mom gave you - try it, you might actually like it. However, if you are a vegetarian, have a food allergy, or are just an extremely picky eater - politely explain that you can't eat meat, eggs, onions, etc. Be forewarned that this will probably invite comments, but if you are polite but determined you won't have to eat it.

The first few weeks or month on the Spanish horario may be a difficult adjustment, but remember that eating between meals here is a way of life. Many people have a small snack around 11 or 12 in the morning, and another at 6 or 7. This is where tapas, or bar snacks, come in. You can also buy cheap snacks at the grocery store - there is a Carrefour Express on Calle Toro, and the discount grocery chain, Día, has stores scattered around the city. There is a 24-hour convenience grocery store (overpriced, but the only one of its kind!) right behind the public library in the Plaza de Gabriel y Galán.

There are tons of cafés in Salamanca, each with an atmosphere to suit your mood. The ones in the Plaza Mayor are over-priced, but they are good places to meet friends and watch people, especially when it gets warm, as you can sit outside. There are also many cafés near school in which you can pass the time between classes. Some favourites are Don Quijote and Mandala, which has excellent batidos (milkshakes), but be forewarned that milkshakes in Spain are more like thick chocolate milk than Cook Out. Find your favorite(s).

Some cafés charge a higher amount for your food or beverage if you sit at a table than if you sit at the bar, as there is no tipping (often resulting in poorer service than you typically receive in the States. The reason they charge more at tables is because you are served by a waiter and waiters in Europe are paid a salary; tips do not count much for them since there is not the 15% or 20% gratuity principle. Besides, waiters do their job as a life profession). Unless there are many tables, you will probably not be waited on, so you can order at the bar. You should pay immediately if you take your food/drink to a table rather than waiting till you leave to settle your tab. If you are unsure about whether they have table service, just walk in, sit down, and if a waiter/waitress doesn't approach you within a few minutes, go order at the bar.

Tapas or pinchos are simply small portions of various foods that you can order with your drink, usually with beer, wine or sangría. The most common (and edible) tapas are tortilla española (it is a potato omelette, sometimes called tortilla de patatas) usually served with bread, fried calamari, patatas bravas (fried potatoes with a spicy sauce), olives, cheese, tuna, egg, chicken, or whatever else you can identify. Other tapas options for the more brave among you include items like octopus and various fish-related delicacies. In Salamanca, some of the best places to go for tapas include Don Quijote and Mandala. Sometimes the bars charge you extra for the tapas, and sometimes they are free with your drink. Almost every bar has its tapas on display. 
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

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

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

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

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

!Code
***/
//{{{

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

	return tiddlyWiki;
};


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

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

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

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

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

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

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

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


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

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


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

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

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

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

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

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


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



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


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

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

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

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


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


} // of "install only once"

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


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

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

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

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

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

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

/***
|Name|FramedLinksPlugin|
|Source|http://www.TiddlyTools.com/#FramedLinksPlugin|
|Version|1.0.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|createExternalLink|
|Options|##Configuration|
|Description|clicking an external link opens an IFRAME following the link instead of opening a new tab/window|
This plugin causes clicks on external links to be rendered into inline frames (~IFRAMEs) instead of opening them in new browser tabs/windows.
!!!!!Usage
<<<
Just place an external link into your tiddler content using standard TiddlyWiki syntax.  When this plugin is enabled (see Configuration), an IFRAME will be created dynamically whenever you click the external link.  Clicking on the link again removes the IFRAME.  You can hold down a modifier key (shift, control, or alt) while clicking a specific link to ''temporarily'' bypass the plugin-enhanced IFRAME handling and use the standard link handling behavior for that link.
<<<
!!!!!Configuration
<<<
<<option chkFramedLinks>> display external links using inline frames
{{{usage: <<option chkFramedLinks>>}}}

IFRAME size  (use CSS units: %, em, px, cm, in):
>width: <<option txtFrameWidth>> height: <<option txtFrameHeight>>
>{{{usage: <<option txtFrameWidth>> <<option txtFrameHeight>>}}}
<<<
!!!!!Examples
<<<
Enable the plugin (see Configuration)... then try these links:
*http://www.TiddlyWiki.com
*http://www.TiddlyTools.com
*http://groups.google.com/group/TiddlyWiki/topics
<<<
!!!!!Revisions
<<<
2007.11.29 [1.0.5] added slider animation and improved CSS handling for IFRAME height/width to maximize display area
2007.11.29 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.FramedLinks= {major: 1, minor: 0, revision: 5, date: new Date(2007,11,29)};

if (config.options.chkFramedLinks==undefined) config.options.chkFramedLinks=true;
if (config.options.txtFrameWidth==undefined) config.options.txtFrameWidth="100%";
if (config.options.txtFrameHeight==undefined) config.options.txtFrameHeight="80%";

window.framedLinks_createExternalLink=createExternalLink;
window.createExternalLink=function(place,url)
{
	var link=this.framedLinks_createExternalLink.apply(this,arguments);
	link.onclick=function(ev) { var e=ev?ev:window.event;
		if (!config.options.chkFramedLinks || e.ctrlKey || e.shiftKey || e.altKey) return; // BYPASS
		var p=this.parentNode; 
		var f=this.nextSibling?this.nextSibling.firstChild:null; // get the IFRAME... maybe...
		var w=config.options.txtFrameWidth; if (!w || !w.length) w="100%";
		var h=config.options.txtFrameHeight; if (!h || !h.length) h="80%";
		if (h.indexOf("%")) h=(findWindowHeight()*h.replace(/%/,"")/100)+"px"; // calc height as % of window
		var showing=f && f.nodeName.toUpperCase()=="IFRAME"; // does IFRAME really exist?
		var stretchCell=p.nodeName.toUpperCase()=="TD" && w.indexOf("%")!=-1 && w.replace(/%/,"")>=100;
		if (!showing) { // create an iframe
			link.style.display="block"; // force IFRAME onto line following link
			if (stretchCell) { p.setAttribute("savedWidth",p.style.width); p.style.width="100%"; } // adjust TD so IFRAME stretches
			var wrapper=createTiddlyElement(null,"span"); // wrapper for slider animation
			wrapper.setAttribute("url",this.href); // for async loading of frame after animation completes
			var f=createTiddlyElement(wrapper,"iframe"); // create IFRAME
			f.style.backgroundColor="#fff"; f.style.width=w; f.style.height=h;
			p.insertBefore(wrapper,this.nextSibling);
			function loadURL(wrapper) { var f=wrapper.firstChild; var url=wrapper.getAttribute("url");
				var d=f.contentDocument?f.contentDocument:(f.contentWindow?f.contentWindow.document:f.document);
				d.open(); d.writeln("<html>connecting to "+url+"</html>"); d.close();
				try { f.src=url; } // if the iframe can't handle the href
				catch(e) { alert(e.description?e.description:e.toString()); } // ... then report the error
				window.scrollTo(0,ensureVisible(wrapper));
			}
			if (!config.options.chkAnimate) loadURL(wrapper);
			else {
				var morph=new Slider(wrapper,true);
				morph.callback=loadURL;
				morph.properties.push({style: 'width', start: 0, end: 100, template: '%0%'});
				anim.startAnimating(morph);
			}
		} else { // remove iframe
			link.style.display="inline"; // restore link style
			if (stretchCell) p.style.width=p.getAttribute("savedWidth"); // restore previous width of TD
			if (!config.options.chkAnimate) p.removeChild(f.parentNode);
			else {
				var morph=new Slider(f.parentNode,false,false,"all");
				morph.properties.push({style: 'width', start: 100, end: 0, template: '%0%'});
				anim.startAnimating(morph);
			}
		}
		e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); return false;
	}
	return link;
}
//}}}
Home to the splendid Alhambra, Granada is a fascinating historical illustration of two worlds and two eras that collided when this last Moorish stronghold fell to Ferdinand's Christian armies in 1492, just as Columbus fatefully sailed for the Americas. See the Cathedral where Ferdinand and Isabel rest, just steps away from the city's medieval Arab university. Get lost in the Albaicín, the city's traditional Arab quarter, a whitewashed maze of charming architecture that has retained its traditional flavor for centuries. Tour the lush gardens and spectacular fountains of the Alhambra's Generalife, a breathtaking contrast to the dry landscape out to the horizon dotted with olive trees. Take a rest from the Spanish heat in the forest below the Alhambra, listening to the trickle of water from ancient Arab fountains. Enjoy views about town of the Sierra Nevada mountains where skiing continues into early spring. When the snow burns off in Granada, you can head to the beaches of the Costa del Sol less than an hour away. More than a historical treasure house, Granada is a bustling university town with a booming bar scene where you will find students from all over the world enjoying perhaps the best tapas in all of Spain. With so many bars vying for so many students and tourists, the competition creates absolutely delicious results! 
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/Granada_patio_de_Acequia_2.jpg]]
<html><img align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/salamanca5.jpg" alt="" /></html><html><p><span style="font-size: larger;"><strong>2008-2009</strong></span></html><html><ul><li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font color="#ffff00">[[INFORMATION AND POLICIES]]<br />           </font></b></font></li><li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font size="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Student Visa info</font><font face="Verdana, Arial, Helvetica, sans-serif" color="#000000">:</font><font face="Verdana, Arial, Helvetica, sans-serif" color="#ffff00"> </font></b></font> </b></font>             <ul><li><a href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/WFU%20Spain%20Visa%20Instructions%20SEMESTER.doc" linkindex="1" set="yes">Instructions for student visa for semester</a></li><li><a href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/WFU%20Spain%20Visa%20Instructions%20YEAR.doc" linkindex="1" set="yes">Instructions for student visa for one year </a></li><li><a href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/Consulate%20Information.xls" linkindex="1" set="yes">Consulate information</a></li></ul></li></ul></html>
After eating all the tapas and your madre's cooking, you may want to find a way to work it all off. The majority athletic activity (for those who do exercise) takes place outdoors, but do not expect beautiful weather. You will be walking further and more frequently than you ever imagined your feet could take you, so you will be getting a lot of incidental exercise. It is not customary to jog through the streets, so take advantage of the long afternoons for additional invigorating activity at the following places.

Head to Salas Bajas. It's quite a hike, located on the other side of the river to the right of the modern bridge as you leave the city, so you even get somewhat of a workout before you arrive there. It is well worth the walk. We spent many an afternoon there, running on the l km dirt track, playing volleyball, basketball, soccer, tennis...and even picnicking. Your Universidad de Salamanca ID can get you the necessary equipment (with the exception of tennis racquets) at the field center. You can also use the locker rooms there.

If the weather is poor or if you just prefer indoor exercise, many gyms offer aerobics, salsa and flamenco classes, karate classes, free-weights, stairmasters and treadmills. Shop around a bit before joining a gym to make sure its facilities, hours, and prices suit you. Some have cheaper rates if you use them in the mornings, and you often will have the option of 2, 3, 4 or 6 days a week for 2 weeks to a month. Depending on the deal you choose, you can expect to pay an average of $40 a month for gym membership and use. Make sure to check your calendar before joining because you don't want to pay for the gym when you will be out of town.

Gyms include Splashthic by the RENFE station (the best facilities in town, but more expensive), Gimnasio Pasadena on Calle Ancha near Placentinos, Gimnasio Kata on Paseo de Carmelitas, next to TIVE; Gimnasio Pesa, near Cine Van Dyck on Fernando de la Peña; and Gimnasio España in Plaza de España. Ask your host family if there are any near your house - more likely than not there are. Try to get group rates if several people join.

Professional Sports: If you get the opportunity, attend at least one pro soccer game. The Spanish fanáticos will show you what passion is all about. Tickets can be purchased at the stadiums and range from US$6 - $80, depending on which teams are playing and where the game is held. If you consider bullfighting a sport and think you can stomach it, go to a bullfight. What may seem like animal cruelty to some of us is really a significant part of Spanish culture. Pamplona, San Sebastian, Sevilla, and Madrid all have famous bullrings. 
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.1.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|'HTML' formatter|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2008.04.26 [*.*.*] plugin size reduction: more documentation moved to HTMLFormattingInfo
2008.01.08 [*.*.*] plugin size reduction: documentation moved to HTMLFormattingInfo
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.06.14 [2.1.5] in formatter, removed call to e.normalize().  Creates an INFINITE RECURSION error in Safari!!!!
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormatting = {major: 2, minor: 1, revision: 5, date: new Date(2007,6,14)};

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

// wikify text nodes remaining after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode)
{
	// textarea node doesn't get wikified, just decoded... 
	if (theNode.nodeName.toLowerCase()=='textarea')
		theNode.value=theNode.value.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n');
	else for (var i=0;i<theNode.childNodes.length;i++) {
		var theChild=theNode.childNodes.item(i);
		if (theChild.nodeName.toLowerCase()=='option') continue;
		if (theChild.nodeName.toLowerCase()=='select') continue;
		wikifyTextNodes(theChild);
		if (theChild.nodeName=='#text') {
			var txt=theChild.nodeValue;
			// decode macro brackets and newlines
			txt=txt.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n');
			// replace text node with wikified() span
			var newNode=createTiddlyElement(null,"span");
			theNode.replaceChild(newNode,theChild);
			wikify(txt,newNode);
		}
	}
}
//}}}
The program will pay for insurance for all the students. You will need to show the doctor or hospital your Cursos Internacionales student ID (which you will receive once you arrive in Salamanca). The insurance is with a company called Sanitas and should be accepted everywhere.

In the case that Sanitas does not cover a certain service, your insurance in the U.S. should pay for it. You would need to be prepared to pay the bill with cash (at a doctor's office or private hospital). A public hospital will give you a bill (flat rate of about $70) with instructions where to go to pay it. Keep all bills and receipts, translate them, and send them to your insurance company at home.

If you are sick and want to see a private doctor, talk to your program director who can recommend one. If you go to a private hospital, there will be less wait than if you go to a public one. Of course, if it's an emergency the university hospital is close by. If at all possible, make sure you have someone with you to help translate, because if you're sick, the last thing you'll want to do is speak Spanish.

If you are feeling sick and just need some over-the-counter medicine (for the flu, motion sickness, etc) go to one of the pharmacies and just tell the pharmacist what's wrong with you.

Sightseeing and entertainment

Salamanca is rich in history, art, and architecture. You will tour the Old and New Cathedrals and the University as a group, but be sure to stop by the Oficina de Turismo (on the plaza mayor and in the Casa de las Conchas on the Rúa Mayor) to get more ideas. From the Roman Bridge to the round church at the Puerta de Zamora, the old city is an amazing place for exploration. Take an afternoon or two to get lost and discover on your own - find the mirador that overlooks the river, the bowling alley behind the Carrefour Express, the movie theatres Van Dyck and Vialia. Explore the parks and the tiny winding streets. See the little University museum and the other cathedrals around town. Every corner can bring a new discovery. 
DEPARTMENT OF ROMANCE LANGUAGES STUDY ABROAD: 
INFORMATION AND POLICIES 

The Programs 

The Department of Romance Languages sponsors semester and year long abroad programs, in the fall in Dijon (France), in the fall and spring in Salamanca (Spain), and intensive summer language institutes (ISLI) in Querétaro (Mexico) and in Venice, Italy. As Wake Forest programs, these study abroad opportunities are evaluated in accordance with Wake Forest guidelines, fall under the Wake Forest Honor Code, and are administered as a regular Wake Forest study program. As part of these academic programs, and included in their respective costs, a number of group excursions and trips to places of cultural interest are offered. 

The Director 

The Director of the study abroad program is a faculty member in the Department of Romance Languages who is authorized to supervise all aspects of the program. The Director remains with the group throughout the length of the program, accompanies students on group excursions, and is available to aid, advise, and attend to students and their concerns during the stay abroad. In Dijon, Salamanca, and Venice the Director teaches one course. In Querétaro, the Director may on occasion teach Spanish 213. 

The Faculty 

Except for the course taught by the Director, all courses are taught by professors from universities located in the respective study abroad sites. The Department of Romance Languages considers this collaboration with native professors an asset to its programs. Their European or Latin American background and perspectives provide students with a more international and global approach, an essential goal of the study abroad experience. Students should expect their professors to offer a different approach to the discipline, not only in perspective, but also in terms of course plan and evaluative tools. Students should not expect the teaching style of their Spanish, Italian, French, or Mexican professors to replicate the style of the professors on the Wake Forest campus. 

Courses 

Courses taken as part of the Romance Languages study abroad programs are Wake Forest courses and are evaluated as such. All courses are taught in the target language by the director and/or the faculty from the local university. Course content is presented either in a syllabus or in a general description of the course. 

Grades 

As part of the Wake Forest curriculum, courses taken as part of any of the Romance Languages study abroad programs are evaluated in accordance with the grading system on campus. Native professors are provided with a translation into the respective language of the description of grades published in the Wake Forest undergraduate bulletin. When the grading system used is that of the country of the study abroad site, grades are translated into the American system before they are reported to the Office of the Registrar. 

Cultural Activities 

Participants in the Romance Languages study abroad programs are encouraged to explore the culture of the country where they study. Program monies underwrite many cultural activities, including group trips and excursions. During such trips, students must remain with the group and follow its itinerary. A student may not separate from the group to visit other cities. The program will pay for cultural activities under the following circumstances: when the group is together; when, in the judgment of the Director, the activity is related to the Program or to a course; and when the Director organizes the activity. In the event that a student declines to participate in a cultural activity sponsored by the program, s/he will not be reimbursed for the cost of that activity. 

Books 

The program will pay for books and other materials (e.g. newspapers) that students need for their coursework while studying abroad. The Director will inform the group of where texts may be picked up or purchased. Students may receive some of their textbooks at Wake Forest before leaving the U.S. while other texts may be purchased after they arrive at the study abroad site. 

Meals 

For students participating in the Salamanca program, all meals are provided by their respective host families. Querétaro students receive breakfast and dinner from their host families and purchase lunch for themselves. Host families participating in the Dijon program offer students a daily breakfast and two evening meals per week; they receive a daily allowance from the Director to pay for the cost of other meals, available in cafes or restaurants in town or at student cafeterias at the university. Breakfast and dinner are included during all excursions and trips that are a part of the academic program in Salamanca and Dijon; during these, students also receive a daily allowance for lunch. Students will receive no reimbursement for meals they miss either with the host family or during group excursions and trips. 

Transportation 

The Dijon and Salamanca programs pay for students’ roundtrip transportation costs to and from the foreign study site (up to $1,200). While the program will pay transportation costs for group excursions and trips, when students travel on their own during weekends and other breaks, they must pay their own way. Because Dijon and Salamanca pose different local transportation needs, policies pertaining to local transportation are different at the two sites. Participants in the Dijon program will be provided funds to purchase the bus passes they will need to get to their university classes. In Salamanca, no travel allowance will be provided for transportation unless a student is housed outside a normal radius from the town center. Students in Querétaro and Venice provide their own transportation to and from Mexico/Italy and within Querétaro and Venice. 


E-mail 

Students participating in the Romance Languages study abroad programs should not expect to find the same technological infrastructure and on-demand access to e-mail and the Internet that they have on the Reynolda Campus. Arrangements will be made, however, for them to have access to e-mail accounts while they are in Dijon and Salamanca, although, this may be on a more limited basis than what they are accustomed to. All Wake Forest students participating in a study abroad program are required to complete forms on which they state their intent to leave, store, or take their computer with them. They must also sign computer liability and insurance forms. 

Medical Insurance 
Students enrolled in the Salamanca program receive insurance, paid by the Program, through the Office of International Studies at the University of Salamanca. Students must be prepared, however, to pay for any medical expenses not covered by the insurance and then to present receipts for those expenses to their insurance company in the United States. Students enrolled in the Dijon and Salamanca programs must confirm with their insurance company that their policy will cover their medical expenses while they are abroad. They will then be expected to pay their own medical expense and present receipts to their insurance company once they return to the United States. Students in Querétaro and Venice must have medical insurance in the United States. 

Visits from Family 
Students are encouraged to invite their families to visit them while they are abroad. Such visits should take place after students have settled into life with their host families; it is recommended that families from the United States not visit during the first three weeks of the program. Visiting family members and friends should not expect to stay in the home of the host family. It will not be possible for anyone not enrolled in the Program to participate in group trips and excursions. 

Important: Salamanca Policies 
A Free airfare is extended to all students whose flight falls under a $1200.00 limit. The program will do everything to negotiate the cheapest airfares possible for its students, but can not guarantee that all flights will fall under this limit. Students whose ticket passes this limit in cost may be asked to pay a penalty to cover the difference. As of the drafting of this memorandum (September 19, 2003) all students will receive tickets exclusively negotiated by the Director and may not arrange their own travel expecting compensation from WFU in any amount towards their travel. However, if the director determines that students will generally receive more favorable fares through individual rather than group purchase, WFU in Salamanca may extend compensation of 
up to $1200.00 to students purchasing their own tickets. The director will announce any change to the standing ticket policy in due time. 

B WFU in Salamanca does not take responsibility for arranging student visas, which are required for participation in the program. All students and parents should read carefully the section below regarding visas. 

C All students participating in the program must reside with the families approved and assigned to each student by the program. Students may not make their own arrangements for residence, as the home-stay is considered an essential part of the program. 

D Students have internet access and printing facilities in Salamanca at the WFU Center. 

E Students will receive a cash stipend from their director for meals on all group trips. This stipend is calculated to defray the costs of dining at reasonably-priced establishments, but is not guaranteed to cover all dining expenses that students may incur. 

F Group travel is a mandatory component of the program. Students may not abbreviate their participation in or skip these trips for personal reasons. Only program participants may travel on group transportation and lodge in group facilities on all official trips. Any friends or family seeing students during group trips must work around the group schedule in order to visit with students. 

G. All students are automatically covered by medical insurance under Sanitas for the entire duration of the program. No solicitation of coverage is necessary. Important Note Regarding Visas 

Students participating in the WFU in Salamanca program are required to obtain a student visa from the Spanish embassy covering their state of residence prior to departure from Spain. The WFU in Salamanca program does not take responsibility for the successful solicitation of student visas or oversee the visa application process. The following information is intended to assist students, but does not represent a commitment on the University’s part to secure student visas for our program participants. Foreign visitors to Spain are entitled to stay in the country for 3 months on a tourist visa, which is issued during air travel and requires no previous solicitation. Go to www.spainemb.org and see the student visa information on this WFU website. Some additional tips will be helpful: 

1. Be sure to find the Spanish consulate with jurisdiction over your home state – the state where you maintain permanent residence. This is where you must request your application. 

2. Contact your local Spanish consulate by telephone and by letter to request a student visa application. Using both mediums will reduce the chance for oversight of your request by the Consulate. You must request a form personally. The University cannot do it for you, and you cannot make copies of others’ forms. 

3. When you call the Consulate, ask them if you can send in your application materials by mail, with your visa to be delivered to you by mail. Some consulates will allow the process by mail, and some will require you to come in person. 

4. Request an application and gather up your materials as soon as possible, but DO NOT apply as soon as possible. Your application should be sent during a specific time window. (As of 2002 the Washington Consulate recommended that applicants send their application no more than 90 days and no less than 60 days before travel. Check with your local consulate as to filing time recommendations.) 

5. See the web page for the materials required for the visa. Under the section with various options from which you must submit one document, you should choose the “letter from the study abroad program assuming financial responsibility” for you. This information will be provided in letters from WFU. As these WFU letters must be addressed individually to each Consulate General, please contact the Program Director with a short request for this letter (by e-mail is fine) and the location of your Consulate. We will have them signed and have you pick them up. 

6. When you get to Spain you can request the “Student Residency Card” from the police station, so don’t worry about that right now. 

/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Version|1.6.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|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.
!!!!!Usage
<<<
When installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.

''Deferred execution from an 'onClick' link''
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

''External script source files:''
You can also load javascript 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.

''Display script source in tiddler output''
By including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.

''Defining javascript functions and libraries:''
Although the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed.  Thus, you cannot load a library and //immediately// use it's functions within the same tiddler.  However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).

To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened.  For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.

Since the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines.  Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.

''Creating dynamic tiddler content''
An important difference between this implementation of embedded 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() 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 completely replaces the entire ~TiddlyWiki document in your browser window.
* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.

If your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display.  For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.

//Note: your script code is automatically 'wrapped' 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.//

''Accessing the ~TiddlyWiki DOM''
The plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.

Access to this DOM element allows you to create scripts that can:
* vary their actions based upon the specific location in which they are embedded
* access 'tiddler-relative' information (use findContainingTiddler(place))
* perform direct DOM manipulations (when returning wikified text is not enough)
<<<
!!!!!Examples
<<<
an "alert" message box:
><script show>
	alert('InlineJavascriptPlugin: this is a demonstration message');
</script>
dynamic output:
><script show>
	return (new Date()).toString();
</script>
wikified dynamic output:
><script show>
	return "link to current user: [["+config.options.txtUserName+"]]";
</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).id.substr(7);
   return title+" is using "+store.getTiddlerText(title).length+" bytes";
</script>
creating an 'onclick' button/link that runs a script:
><script label="click here" title="clicking this link will show an 'alert' box" show>
   if (!window.story) window.story=window;
   alert("Hello World!\nlinktext='"+place.firstChild.data+"'\ntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");
</script>
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}
>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}
><script src="demo.js" show>
	return "loading demo.js..."
</script>
><script label="click to execute demo() function" show>
	demo()
</script>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''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
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.inlineJavascript= {major: 1, minor: 6, revision: 0, date: new Date(2007,2,19)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\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) {
			if (lookaheadMatch[1]) { // load a script library
				// make script tag, set src, add to body to execute, then remove for cleanup
				var script = document.createElement("script"); script.src = lookaheadMatch[1];
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (lookaheadMatch[5]) { // there is script code
				if (lookaheadMatch[4]) // show inline script code in tiddler output
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (lookaheadMatch[2]) { // create a link to an 'onclick' script
					// add a link, define click handler, save code in link (pass 'place'), set link attributes
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);
					link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}
					link.code="function _out(place){"+lookaheadMatch[5]+"\n};_out(this);"
					link.setAttribute("title",lookaheadMatch[3]?lookaheadMatch[3]:"");
					link.setAttribute("href","javascript:;");
					link.style.cursor="pointer";
				}
				else { // run inline script code
					var code="function _out(place){"+lookaheadMatch[5]+"\n};_out(w.output);"
					code=code.replace(/document.write\(/gi,'place.innerHTML+=(');
					try { var out = eval(code); } 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;
		}
	}
} )
//}}}
<html><img hspace="10" height="308" width="411" align="right" alt="" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image001.jpg" /></html>A faculty member from the Department of Romance Languages serves as the semester or year director, travels and stays with the program during his/her directorship period, and oversees the academic aspect of the program for that period. An on-site Director and the Program Coordinator oversee the overall administration of the program. Students take courses taught by the faculty director as well as by professors at the University of Salamanca. Some of the courses offered include Spanish Language, Literature, Art History, Political Science, Art, and Business. As part of the University of Salamanca's special integrated program, students may take courses with Spanish students in the following disciplines: Education, Psychology, Business, Economics, Biology, Translation/Interpretation, and Anthropology. Internships are also available. All courses are taught in Spanish.

All Salamanca [[courses]] are regular Wake Forest [[courses]]. No pre-approval is required for Wake Forest students.
Non-Wake Forest students will need to consult their respective institutions for credit transfer.

As a part of the University of Salamanca PEI program (Programa Especial Integrado), students may take regular courses with Spanish students in the following disciplines: Education, Psychology, Business, Economics, Biology, Translation/Interpretation and Anthropology.

-----

''[[Internships]] in Salamanca''
All internships are numbered SPA. 199 and worth 1.5 or 3-hour courses; they do not count for the minor or major. Students are required to participate consistently and complete a series of written assignments relating to their experience and their internship field. Students should consult their program director for guidance with these assignments, and submit all work to him or her for evaluation.

In some cases evening participation during the week is available or a possibility
// Ensure the Plugin is only installed once.
//
if (!version.extensions.IntelliTaggerPlugin) {

// Ensure the global abego namespace is set up.
if (!window.abego) window.abego = {};
if (!abego.internal) abego.internal = {};

// Opens an alert with the given string and throws an exception 
// with the same string after the alert is closed.
//
abego.alertAndThrow = function(s) {
 alert(s);
 throw s;
};

if (version.major < 2) {
 abego.alertAndThrow("Use TiddlyWiki 2.0.8 or better to run the IntelliTagger Plugin.");
}

version.extensions.IntelliTaggerPlugin = {
 major: 1, minor: 0, revision: 0,
 date: new Date(2006, 3, 26),
 type: 'plugin',
 source: "http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin",
 documentation: "[[IntelliTaggerPlugin Documentation]]",
 sourcecode: "[[IntelliTaggerPlugin SourceCode]]",
 author: "Udo Borkowski (ub [at] abego-software [dot] de)",
 licence: "[[BSD open source license (abego Software)]]",
 tiddlywiki: "Version 2.0.8 or better",
 browser: "Firefox 1.5.0.2 or better"
};

// ========================================================================
// Utilities ==============================================================
// ========================================================================

// ========================================================================
// Popup 
// 
// A Popup is an HTML element floating on top of the main HTML page. 
// 
// The HTML element (typically a "div" element) is added as a direct child 
// of the document.body.
//
// A Popup element should respect the following style conventions:
//
// position = "absolute"; // required.
// left = aDimension; // required. E.g. "10px"
// // When not defined the Popup is not displayed.
// top = aDimension; // required. E.g. "10px"
// // When not defined the Popup is not displayed.
// background = aColor; // optional. E.g. "white"
// // When not defined the Popup is transparent.
// border = aBorderSpec; // optional. E.g. "1px solid DarkGray"
// width = aDimension; // optional. E.g. "200px"
// // When not defined the width is calculated 
// // automatically.
// height = aDimension; // optional. E.g. "200px"
// // When not defined the height is calculated 
// // automatically.
// ========================================================================



// Returns true iff the given element is "opened as a popup", 
// i.e. a direct child of the document.body.
//
// @param element [may be null/undefined] 
// an HTML element
//
abego.isPopupOpen = function(element) {
 return element && element.parentNode == document.body;
};

// Opens the given element as a popup.
// 
// @param element 
// an HTML element
//
abego.openAsPopup = function(element) {
 if (element.parentNode != document.body)
 document.body.appendChild(element);
};


// Closes the given popup.
// Does nothing when the element is not a popup or not open.
//
// @param element [may be null/undefined] 
// an HTML element
//
abego.closePopup = function(element) {
 if (abego.isPopupOpen(element)) 
 document.body.removeChild(element);
};

// Returns the rectangle of the (browser) window
//
// @return {left,top,height,width}
// 
abego.getWindowRect = function() {
 return {
 left: findScrollX(),
 top: findScrollY(),
 height: findWindowHeight(),
 width: findWindowWidth()
 };
};

// Moves the given element to the given position (in pixel).
//
abego.moveElement = function(element, left, top) {
 element.style.left = left + "px";
 element.style.top = top + "px";
};

// Centers the given element on the window.
//
// The element must have absolute position
// 
abego.centerOnWindow = function(element) {
 if (element.style.position != "absolute") 
 throw "abego.centerOnWindow: element must have absolute position"; 
 
 var winRect = abego.getWindowRect();

 abego.moveElement(
 element,
 winRect.left + (winRect.width - element.offsetWidth) / 2,
 winRect.top + (winRect.height - element.offsetHeight) / 2);
};

// Returns true if e is either self or a descendant (child, grandchild,...) of self.
//
// @param self DOM:Element
// @param e DOM:Element [may be null]
//
abego.isDescendantOrSelf = function(self, e) {
 while (e) {
 if (self == e) return true;
 e = e.parentNode;
 }
 return false;
};

// Returns a set containing the items of the array. 
// 
// It is an object that has a property for every item of the array.
// The name of the property is the "toString" representation of 
// the item. The value of the property is "true".
//
// Duplicate items are removed.
//
abego.toSet = function(array) {
 var result = {};
 for (var i = 0; i < array.length; i++)
 result[array[i]] = true;
 return result;
};

// Returns an array with all strings from strings that match the filterRE.
//
// @param maxCount [optional] if defined at most maxCount strings are returned.
abego.filterStrings = function(strings, filterRE, maxCount) {
 var result =[];
 for (var i = 0; i < strings.length && (maxCount === undefined || result.length < maxCount); i++) {
 var s = strings[i];
 if (s.match(filterRE)) 
 result.push(s);
 }
 return result;
};

abego.arraysAreEqual = function(a,b) {
 var n = a.length;
 if (n != b.length) 
 return false;
 for (var i = 0; i < n; i++) 
 if (a[i] != b[i])
 return false;
 return true;
};

// Adjusts the element's position to appear below the anchorElement, 
// and ensures the element fits into the window.
//
abego.moveBelowAndClip = function(element, anchorElement) {
 if (!anchorElement) 
 return;
 
 // Position the result below the anchor and resize it if necessary.
 var anchorLeft = findPosX(anchorElement);
 var anchorTop = findPosY(anchorElement);
 var anchorHeight = anchorElement.offsetHeight;
 var elementLeft = anchorLeft;
 var elementTop = anchorTop + anchorHeight;

 // Make sure the result is not wider than the window
 var winWidth = findWindowWidth();
 if (winWidth < element.offsetWidth) {
 element.style.width = (winWidth - 100)+"px";
 }

 // Ensure that the left and right of the result are not
 // clipped by the window. Move it to the left or right, if necessary. 
 var elementWidth = element.offsetWidth;
 if(elementLeft + elementWidth > winWidth)
 elementLeft = winWidth - elementWidth-30;
 if (elementLeft < 0) 
 elementLeft = 0;
 
 // Do the actual moving
 element.style.left = elementLeft + "px";
 element.style.top = elementTop + "px";
 element.style.display = "block";
};

abego.compareStrings = function(a, b) {
 return (a == b) ? 0 : (a < b) ? -1 : 1;
};

// Sorts the given array alphabetically, ignoring the case.
//
abego.sortIgnoreCase = function(arr) {
 var result =[];
 
 // To avoid toLowerCase to be called twice for every comparison
 // we convert the strings once and sort the lowercase.
 // After sorting we replace them with the cased ones.
 //
 // Benchmarks have shown that this is significantly faster 
 // than the ad hoc solution, even for small arrays 
 // (like 5 Strings (10 chars each))
 
 var n = arr.length;
 for (var i = 0; i < n; i++) {
 var s = arr[i];
 result.push([s.toString().toLowerCase(),s]);
 }
 result.sort(function(a,b) {
 return (a[0] == b[0]) ? 0 : (a[0] < b[0]) ? -1 : 1;
 });
 
 for (i = 0; i < n; i++) 
 arr[i] = result[i][1];
};

// Returns the specified field (input or textarea element), otherwise the first edit field it finds 
// or null if it found no edit field at all
//
abego.getTiddlerField = function(story,title,field) {
 var tiddler = document.getElementById(story.idPrefix + title);
 var e = null;
 if (tiddler != null) {
 var children = tiddler.getElementsByTagName("*");
 for (var t=0; t<children.length; t++) {
 var c = children[t];
 if(c.tagName.toLowerCase() == "input" || c.tagName.toLowerCase() == "textarea") {
 if(!e)
 e = c;
 if(c.getAttribute("edit") == field)
 e = c;
 // break; // adding this break would not be 100% compatible to <= TW 2.0.9. when a 
 }
 }
 }
 return e;
};

abego.setRange = function(element, start, end) {
// adapted from TaskMacroPlugin by LukeBlanshard. 
// http://labwiki.sourceforge.net/#CopyrightAndLicense.
 if (element.setSelectionRange) { // Mozilla
 element.setSelectionRange(start, end);
 // Damn mozilla doesn't scroll to visible. Approximate.
 var max = 0.0 + element.scrollHeight;
 var len = element.textLength;
 var top = max*start/len, bot = max*end/len;
 element.scrollTop = Math.min(top, (bot+top-element.clientHeight)/2);
 } else if (element.createTextRange != undefined) { // IE
 var range = element.createTextRange();
 range.collapse();
 range.moveEnd("character", end);
 range.moveStart("character", start);
 range.select();
 } else // Other? Too bad, just select the whole thing.
 element.select();
};
 
 
// TiddlerSet: an object with one property per tiddler in the set. 
// The name of the property corresponds to the tiddler name, 
// the value is "not false" (e.g. true or a non-zero number).
//
// TagMap<X>: an object that maps a tag to an object of type X (access through properties)
//
abego.internal.TagManager = function() {
 var tagReferences = null; // TagMap<{count: natural, tiddlers: TiddlerSet}>

 var ensureTagsAreLoaded = function() {
 if (tagReferences)
 return;
 
 tagReferences = {};
 store.forEachTiddler(function(title,tiddler) {
 for(var i=0; i<tiddler.tags.length; i++) {
 var tag = tiddler.tags[i];
 var refedBy = tagReferences[tag];
 if (!refedBy) {
 refedBy = tagReferences[tag] = {count:0, tiddlers: {}};
 }
 refedBy.tiddlers[tiddler.title] = true;
 refedBy.count += 1;
 }
 });
 };
 
 // When any tags are changed reset the TagManager.
 // 
 var oldTiddlyWikiSaveTiddler = TiddlyWiki.prototype.saveTiddler;
 TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags) {
 var tiddler = this.fetchTiddler(title);
 var oldTags = tiddler ? tiddler.tags : [];
 var newTags = (typeof tags == "string") ? tags.readBracketedList() : tags;

 oldTiddlyWikiSaveTiddler.apply(this, arguments);
 
 if (!abego.arraysAreEqual(oldTags, newTags))
 abego.internal.getTagManager().reset();
 };

 // When a tiddler is removed that had tags reset the TagManager.
 //
 var oldTiddlyWikiRemoveTiddler = TiddlyWiki.prototype.removeTiddler;
 TiddlyWiki.prototype.removeTiddler = function(title) {
 var tiddler = this.fetchTiddler(title);
 var resetTagManager = tiddler && tiddler.tags.length > 0;
 
 oldTiddlyWikiRemoveTiddler.apply(this, arguments);
 
 if (resetTagManager) 
 abego.internal.getTagManager().reset();
 };

 // Resets the TagManager, thus ensures that cached tagging 
 // information is discarded and the most recent tag state is used.
 // 
 this.reset = function () {
 tagReferences = null;
 };
 
 
 // Returns a TiddlerSet with all tiddlers that have the given tag, 
 // or null when the tag is not used in any tiddler.
 //
 // @return [may be null]
 //
 this.getTiddlersWithTag = function(tag) {
 ensureTagsAreLoaded();

 var tagInfo = tagReferences[tag];
 return tagInfo ? tagInfo.tiddlers : null;
 };
 
 // Returns an array with the names of all tags defined 
 // plus the (optional) extraTags. 
 //
 // The tags are sorted alphabetically (caseinsensitive).
 //
 // @params [optional] an array of tags to be added to the list
 //
 //
 this.getAllTags = function(extraTags) {
 ensureTagsAreLoaded();
 
 var result =[];
 for (var i in tagReferences) 
 result.push(i);
 
 for (i = 0; extraTags && i < extraTags.length; i++) 
 result.pushUnique(extraTags[i], true);
 
 abego.sortIgnoreCase(result);
 
 return result;
 };
 
 // An array with two items per tag
 // result[i][0] : the tag name
 // result[i][1] : TiddlerSet, with tiddlers that are tagged with that tag
 // 
 this.getTagInfos = function() {
 ensureTagsAreLoaded();
 
 var result = [];
 for (var tiddler in tagReferences) {
 result.push([tiddler, tagReferences[tiddler]]);
 }
 return result;
 };
 
 var compareTiddlerCountAndTagName = function(a,b) {
 var a1 = a[1];
 var b1 = b[1];
 var d = b[1].count - a[1].count;
 return d != 0 ? d : abego.compareStrings(a[0].toLowerCase(), b[0].toLowerCase());
 };
 
 this.getSortedTagInfos = function() {
 ensureTagsAreLoaded();

 var result = this.getTagInfos();
 
 result.sort(compareTiddlerCountAndTagName);
 
 return result;
 };
 
 // @return an array of the tags that "partner" the activeTags,
 // sorted by the number of conjoint occurances.
 //
 this.getPartnerRankedTags = function(activeTags) {
 var partnerTagCounts = {};
 for (var i = 0; i < activeTags.length; i++) {
 var tiddlersWithTag = this.getTiddlersWithTag(activeTags[i]);
 for (var name in tiddlersWithTag) {
 var tiddler = store.getTiddler(name);
 // It may happen that a tiddler is "gone" in the meantime
 if (!(tiddler instanceof Tiddler)) 
 continue;
 
 for(var j=0; j<tiddler.tags.length; j++) {
 var tag = tiddler.tags[j];
 var c = partnerTagCounts[tag];
 partnerTagCounts[tag] = c ? c+1 : 1;
 }
 }
 }
 var currentTagSet = abego.toSet(activeTags);
 var result = [];
 for (var n in partnerTagCounts) {
 if (!currentTagSet[n])
 result.push(n);
 }
 // Sort the tags by their partner tag count, then alphabetically
 result.sort(function (a,b) {
 var d = partnerTagCounts[b] - partnerTagCounts[a];
 return d != 0 ? d : abego.compareStrings(a.toLowerCase(), b.toLowerCase());
 });

 return result;
 };
}; // of abego.internal.TagManager

abego.internal.getTagManager = function() {
 if (!abego.internal.gTagManager) abego.internal.gTagManager = new abego.internal.TagManager();
 return abego.internal.gTagManager;
};

// ========================================================================
// IntelliTagger ==========================================================
// ========================================================================


(function(){
 var PADDING = 2;
 var BORDERWIDTH = 1;
 var MAX_FAVORITE_TAGS = 30;

 var fSuggestionPopup; // DOM:Element
 var fAnchorElement; // DOM:Element
 var fOnTagSelected; // function(e) {...}
 var fSuggestedTags; // [Tag]
 var fActiveTagSet; // TagSet
 var fFavoriteTags; // array of Tags, [optional]
 
 if (!abego.IntelliTagger) abego.IntelliTagger = {};

 var getAnchorElement = function() {
 return fAnchorElement;
 };
 
 var isCurrentTag = function(tag) {
 return fActiveTagSet[tag];
 };
 
 var removeLastWord = function(s) {
 var i = s.lastIndexOf(" ");
 return (i >= 0) ? s.substr(0,i) : "";
 };
 
 var lastWordIsFilter = function(inputField) {
 var s = inputField.value;
 var len = s.length; 
 return (len > 0 && s[len-1] != ' ');
 };

 var ensureFieldEndsWithSpace = function(field) {
 var s = field.value;
 var len = s.length;
 if (len > 0 && s[len-1] != ' ') {
 field.value += ' ';
 }
 };
 
 var updateTag = function(tag, inputField, tiddler) {
 if (lastWordIsFilter(inputField)) 
 inputField.value = removeLastWord(inputField.value);
 
 story.setTiddlerTag (tiddler.title,tag,0);
 ensureFieldEndsWithSpace(inputField);
 
 abego.IntelliTagger.assistTagging(inputField, tiddler);
 };
 
 // returns the n-th suggestion, first counting the favorites, then the normal suggestions
 //
 // @param n zero-based.
 // @return [may be null]
 var getNthSuggestion = function(n) {
 if (fFavoriteTags) {
 if (fFavoriteTags.length > n)
 return fFavoriteTags[n];
 
 n -= fFavoriteTags.length;
 }
 
 return (fSuggestedTags && fSuggestedTags.length > n)
 ? fSuggestedTags[n] 
 : null;
 };

 var useNthSuggestion = function(n, inputField, tiddler) {
 var suggestion = getNthSuggestion(n);
 if (suggestion)
 updateTag(suggestion, inputField, tiddler);
 };


 var getFilter = function(inputField) {
 var pos = inputField.value.lastIndexOf(" ");
 var filter = (pos >= 0) ? inputField.value.substr(++pos,inputField.value.length) : inputField.value;
 return new RegExp(filter.escapeRegExp(),"i");
 };


 var countExpectedTags = function(tags, expectedTagsAsProperties) {
 var result = 0;
 for (var i = 0; i<tags.length;i++) 
 if (expectedTagsAsProperties[tags[i]])
 result++;
 return result;
 };
 
 // Returns the number tags that have the same count of tiddlers
 // as the index-th tagInfo. 
 // 
 // The index-th tag is included in the returned number.
 // 
 // @param sortedTagInfo Array of TagInfos, sorted by count of tiddlers.
 //
 var getNumberOfTagsWithSameCount = function(sortedTagInfos, index, filterRE) {
 var result = 1;
 var c = sortedTagInfos[index];
 for (var i = index+1; i < sortedTagInfos.length; i++) 
 if (sortedTagInfos[i][1].count == c) {
 if (sortedTagInfos[i][0].match(filterRE))
 result++;
 } else
 break;
 return result;
 };
 
 var getInitialTagSuggestions = function(filterRE, maxCount) {
 var tagInfos = abego.internal.getTagManager().getSortedTagInfos();
 var result =[];
 var lastCount = 0;
 for (var i = 0; i < tagInfos.length; i++) {
 var c = tagInfos[i][1].count;
 
 // Stop adding tags to the result if not all tags with that count of tiddlers would fit into the result.
 if (c != lastCount) {
 if (maxCount && (result.length + getNumberOfTagsWithSameCount(tagInfos, i, filterRE) > maxCount)) 
 break;
 lastCount = c;
 }
 // Don't add tags that are only used in one tiddler.
 if (c == 1) 
 break;
 var s = tagInfos[i][0];
 if (s.match(filterRE))
 result.push(s);
 }
 return result;
 };
 
 var getAllFilteredTags = function(filterRE, extraTags) {
 return abego.filterStrings(
 abego.internal.getTagManager().getAllTags(extraTags),
 filterRE);
 };

 // Refreshes the tagSuggestions window
 //
 var refreshPopup = function() {
 if (!fSuggestionPopup) 
 return;
 
 // Load the template for the YourSearchResult
 var html = store.getTiddlerText("IntelliTaggerMainTemplate");
 if (!html) 
 html = "<b>Tiddler IntelliTaggerMainTemplate not found</b>";
 fSuggestionPopup.innerHTML = html;
 
 // Expand the template macros etc.
 applyHtmlMacros(fSuggestionPopup,null);
 refreshElements(fSuggestionPopup,null);
 };
 
 var onTagClicked = function(e) { 
 if (!e) var e = window.event;
 var tag = this.getAttribute("tag");
 if (fOnTagSelected)
 fOnTagSelected.call(this,tag, e);
 
 return false;
 };
 
 var appendTags = function(place, tags, suggestionIndex, excludeTags) {
 if (!tags)
 return;
 
 var excludeTagSet = excludeTags ? abego.toSet(excludeTags) : {};
 var n = tags.length;
 for (var i = 0; i < n; i++) {
 var tag = tags[i];
 if (excludeTagSet[tag])
 continue;
 
 if (i > 0) 
 createTiddlyElement(place,"span",null,"tagSeparator", " | ");
 
 var shortcutText = "";
 var placeForButton = place;
 if (suggestionIndex < 10) {
 // create a wrapping span that ensures the number and the text are not linebreaked.
 placeForButton = createTiddlyElement(place,"span",null,"numberedSuggestion");
 
 suggestionIndex++;
 var key = suggestionIndex < 10 ? ""+(suggestionIndex) : "0";
 createTiddlyElement(placeForButton,"span",null,"suggestionNumber", key+") ");
 var fastKeyText = suggestionIndex == 1 ? "Ctrl-Space or " : "";
 shortcutText = " (Shortcut: %1Alt-%0)".format([key, fastKeyText]);
 }

 var shiftClickToolTip = config.views.wikified.tag.tooltip.format([tag]);
 var normalClickToolTip = (isCurrentTag(tag) ? "Remove tag '%0'%1" : "Add tag '%0'%1").format([tag,shortcutText]);
 var tooltip = "%0; Shift-Click: %1".format([normalClickToolTip, shiftClickToolTip]);
 var btn = createTiddlyButton(
 placeForButton,
 tag,
 tooltip, 
 onTagClicked, 
 isCurrentTag(tag) ? "currentTag" : null);
 btn.setAttribute("tag",tag);
 }
 };
 
 var scrollVisible = function() {
 // Scroll the window to make the fSuggestionPopup page (and the anchorElement) visible.
 if (fSuggestionPopup) window.scrollTo(0,ensureVisible(fSuggestionPopup));
 if (getAnchorElement()) window.scrollTo(0,ensureVisible(getAnchorElement()));
 };

 // Close the suggestions window when the user clicks on the document
 // (and not into the getAnchorElement or in the suggestions window)
 //
 var onDocumentClick = function(e) {
 if (!e) var e = window.event;
 if (!fSuggestionPopup) 
 return;
 
 var target = resolveTarget(e);
 if (target == getAnchorElement()) return; 
 if (abego.isDescendantOrSelf(fSuggestionPopup, target)) return; 
 
 abego.IntelliTagger.close();
 };
 addEvent(document,"click",onDocumentClick);
 
 // We added a space to the tags edit field. To avoid that the 
 // tiddler is marked as "changed" just because of that we trim
 // the field value
 //
 var oldGatherSaveFields = Story.prototype.gatherSaveFields;
 Story.prototype.gatherSaveFields = function(e,fields) {
 oldGatherSaveFields.apply(this, arguments);
 var tags = fields.tags;
 if (tags) 
 fields.tags = tags.trim();
 };
 

 var focusTagsField = function(title) {
 story.focusTiddler(title,"tags");
 var tags = abego.getTiddlerField(story, title, "tags");
 if (tags) {
 var len = tags.value.length;
 abego.setRange(tags, len, len);
 window.scrollTo(0,ensureVisible(tags));
 }
 };
 

 // Attach the assistTagging to the "tags" edit field.
 //
 var oldEditHandler = config.macros.edit.handler;
 config.macros.edit.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 oldEditHandler.apply(this, arguments);
 var field = params[0];
 if((tiddler instanceof Tiddler) && field == "tags") {
 // Just added the "edit tags" field. 
 // Attach it to the "Tag Suggestions" feature.
 var inputField = place.lastChild;
 inputField.onfocus = function(e) {
 abego.IntelliTagger.assistTagging(inputField, tiddler);
 setTimeout(
 function() {
 focusTagsField(tiddler.title);
 }, 100);

 };
 inputField.onkeyup = function(e) {
 if (!e) var e = window.event;
 if (e.altKey && !e.ctrlKey && !e.metaKey && (e.keyCode >= 48 && e.keyCode <= 57)) {
 useNthSuggestion(e.keyCode == 48 ? 9 : e.keyCode-49, inputField, tiddler);
 } else if (e.ctrlKey && e.keyCode == 32) {
 useNthSuggestion(0, inputField, tiddler);
 }
 
 setTimeout(
 function() {
 abego.IntelliTagger.assistTagging(inputField, tiddler);
 }, 100);
 return false;
 };
 
 // ensure that the tags text ends with a space 
 // (otherwise the last word is used as a filter when the field gets the focus)
 ensureFieldEndsWithSpace(inputField);
 }
 };
 
 var onEditTags = function(e) {
 if (!e) var e = window.event;
 var target = resolveTarget(e);
 
 var title = target.getAttribute("tiddler");
 if (title) {
 story.displayTiddler(target,title,"IntelliTaggerEditTagsTemplate", false);
 focusTagsField(title);
 }
 return false;
 };
 
 // Add an "[edit]" button to the "tags" field that is displayed with the tiddler in the ViewTemplate.
 // Pressing the button allows editing the tags only, with the text still being displayed in wikified form.
 //
 var oldTagsHandler = config.macros.tags.handler;
 config.macros.tags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 oldTagsHandler.apply(this, arguments);

 abego.IntelliTagger.createEditTagsButton(tiddler, createTiddlyElement(place.lastChild,"li"));
 };
 
 // close the Suggestion Window when the tiddler is no longer edited
 // (i.e. the tag edit inputfield is gone.)
 // 
 // (Note: we must poll this condition since onblur on the input field 
 // cannot be used since every click into the suggestion window results
 // in a lost focus/blur)
 //
 var closeIfAnchorElementIsHidden = function() {
 if (fSuggestionPopup && fAnchorElement && !abego.isDescendantOrSelf(document, fAnchorElement)) 
 abego.IntelliTagger.close();
 };
 setInterval(closeIfAnchorElementIsHidden, 100);
 
//----------------------------------------------------------------------------
// The public API
//----------------------------------------------------------------------------
 
 // @param suggestedTags 
 // array of strings representing the tags to be suggested.
 //
 // @param activeTags 
 // array of strings representing the tags currently "active".
 //
 // @param favoriteTags [optional] 
 // a subset of the suggested tags that are "favorites". 
 // I.e. They should be presented first etc.
 //
 // @param anchorElement [optional]
 // when defined the suggestions are displayed "close" to the anchorElement. 
 // The page is scrolled to make the anchorElement visible.
 // When the anchorElement is not defined the suggestions are displayed in the
 // center of the window.
 //
 // @param onTagSelected [optional]
 // function(tag, e) to be called when a tag is selected.
 //
 abego.IntelliTagger.displayTagSuggestions = function(suggestedTags, activeTags, favoriteTags, anchorElement, onTagSelected) {
 fSuggestedTags = suggestedTags;
 fActiveTagSet = abego.toSet(activeTags);
 fFavoriteTags = favoriteTags;
 fAnchorElement = anchorElement;
 fOnTagSelected = onTagSelected;
 
 if (!fSuggestionPopup) {
 fSuggestionPopup = createTiddlyElement(document.body,"div",null,"intelliTaggerSuggestions");
 fSuggestionPopup.style.position = "absolute";
 }
 
 refreshPopup();
 abego.openAsPopup(fSuggestionPopup);
 
 if (getAnchorElement()) {
 var w = getAnchorElement().offsetWidth;
 if (fSuggestionPopup.offsetWidth < w) {
 fSuggestionPopup.style.width = (w-2*(PADDING+BORDERWIDTH)) + "px";
 }
 abego.moveBelowAndClip(fSuggestionPopup, getAnchorElement());
 } else {
 abego.centerOnWindow(fSuggestionPopup);
 }

 scrollVisible();
 };
 
 // Shows the Tag Suggestion Popup for the given tiddler, below the specified inputField.
 //
 abego.IntelliTagger.assistTagging = function(inputField, tiddler) {
 var filterRE = getFilter(inputField);
 var s = inputField.value;
 if (lastWordIsFilter(inputField)) 
 s = removeLastWord(s);
 var activeTags = s.readBracketedList();
 var favoriteTags = activeTags.length > 0 
 ? abego.filterStrings(abego.internal.getTagManager().getPartnerRankedTags(activeTags), filterRE, MAX_FAVORITE_TAGS)
 : getInitialTagSuggestions(filterRE, MAX_FAVORITE_TAGS);
 abego.IntelliTagger.displayTagSuggestions(
 getAllFilteredTags(filterRE,activeTags), 
 activeTags,
 favoriteTags, 
 inputField,
 function(tag, e) {
 if (e.shiftKey) {
 onClickTag.call(this,e);
 } else
 updateTag(tag, inputField, tiddler);
 });
 };
 
 // Closes the Tag Suggestions Popup
 //
 abego.IntelliTagger.close = function() {
 abego.closePopup(fSuggestionPopup);
 fSuggestionPopup = null;
 return false;
 };

 // Creates an TiddlyButton at the given place to edit the tags of the given tiddler.
 //
 abego.IntelliTagger.createEditTagsButton = function(tiddler, place, text, tooltip, className, id, accessKey) {
 if (!text) text = "[edit]";
 if (!tooltip) tooltip = "Edit the tags";
 if (!className) className = "editTags";
 
 var editButton = createTiddlyButton(place,text,tooltip, onEditTags, className, id, accessKey);
 editButton.setAttribute("tiddler", (tiddler instanceof Tiddler) ? tiddler.title : String(tiddler));
 
 return editButton;
 };

 
//----------------------------------------------------------------------------
// Macros
//----------------------------------------------------------------------------

// ====Macro intelliTagger ================================================

 config.macros.intelliTagger = {
 // Standard Properties
 label: "intelliTagger",

 handler : function(place,macroName,params,wikifier,paramString,tiddler) {
 var namesAndValues = paramString.parseParams("list",null, true);
 var actions = namesAndValues[0]["action"];
 for (var i = 0; actions && i < actions.length; i++) {
 var actionName = actions[i];
 var action = config.macros.intelliTagger.subhandlers[actionName];
 
 if (!action) 
 abego.alertAndThrow("Unsupported action '%0'".format([actionName]));
 
 action(place,macroName,params,wikifier,paramString,tiddler);
 }
 },
 
 subhandlers: {
 
 showTags : function(place,macroName,params,wikifier,paramString,tiddler) {
 appendTags(place, fSuggestedTags, fFavoriteTags ? fFavoriteTags.length : 0, fFavoriteTags);
 },
 
 showFavorites : function(place,macroName,params,wikifier,paramString,tiddler) {
 appendTags(place, fFavoriteTags, 0);
 },
 
 closeButton : function(place,macroName,params,wikifier,paramString,tiddler) {
 var button = createTiddlyButton(place, "close", "Close the suggestions", abego.IntelliTagger.close);
 },

 version : function(place) {
 var t = "IntelliTagger %0.%1.%2".format(
 [version.extensions.IntelliTaggerPlugin.major, 
 version.extensions.IntelliTaggerPlugin.minor, 
 version.extensions.IntelliTaggerPlugin.revision]);
 var e = createTiddlyElement(place, "a");
 e.setAttribute("href", "http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin");
 e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">'+t+'<font>';
 },

 copyright : function(place) {
 var e = createTiddlyElement(place, "a");
 e.setAttribute("href", "http://tiddlywiki.abego-software.de");
 e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">&copy; 2006 <b><font color="red">abego</font></b> Software<font>';
 }
 }
 };
 
})();


config.shadowTiddlers["IntelliTaggerStyleSheet"] = 
 "/***\n"+
 "!~IntelliTagger Stylesheet\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".intelliTaggerSuggestions {\n"+
 "\tposition: absolute;\n"+
 "\twidth: 600px;\n"+
 "\n"+
 "\tpadding: 2px;\n"+
 "\tlist-style: none;\n"+
 "\tmargin: 0;\n"+
 "\n"+
 "\tbackground: #eeeeee;\n"+
 "\tborder: 1px solid DarkGray;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .currentTag {\n"+
 "\tfont-weight: bold;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .suggestionNumber {\n"+
 "\tcolor: #808080;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .numberedSuggestion{\n"+
 "\twhite-space: nowrap;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .intelliTaggerFooter {\n"+
 "\tmargin-top: 4px;\n"+
 "\tborder-top-width: thin;\n"+
 "\tborder-top-style: solid;\n"+
 "\tborder-top-color: #999999;\n"+
 "}\n"+
 ".intelliTaggerSuggestions .favorites {\n"+
 "\tborder-bottom-width: thin;\n"+
 "\tborder-bottom-style: solid;\n"+
 "\tborder-bottom-color: #999999;\n"+
 "\tpadding-bottom: 2px;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .normalTags {\n"+
 "\tpadding-top: 2px;\n"+
 "}\n"+
 "\n"+
 ".intelliTaggerSuggestions .intelliTaggerFooter .button {\n"+
 "\tfont-size: 10px;\n"+
 "\n"+
 "\tpadding-left: 0.3em;\n"+
 "\tpadding-right: 0.3em;\n"+
 "}\n"+
 "\n"+
 "/*}}}*/\n";
 
config.shadowTiddlers["IntelliTaggerMainTemplate"] = 
 "<!--\n"+
 "{{{\n"+
 "-->\n"+
 "<div class=\"favorites\" macro=\"intelliTagger action: showFavorites\"></div>\n"+
 "<div class=\"normalTags\" macro=\"intelliTagger action: showTags\"></div>\n"+
 "<!-- The Footer (with the Navigation) ============================================ -->\n"+
 "<table class=\"intelliTaggerFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+
 " <tr>\n"+
 "\t<td align=\"left\">\n"+
 "\t\t<span macro=\"intelliTagger action: closeButton\"></span>\n"+
 "\t</td>\n"+
 "\t<td align=\"right\">\n"+
 "\t\t<span macro=\"intelliTagger action: version\"></span>, <span macro=\"intelliTagger action: copyright \"></span>\n"+
 "\t</td>\n"+
 " </tr>\n"+
 "</tbody></table>\n"+
 "<!--\n"+
 "}}}\n"+
 "-->\n";
 
config.shadowTiddlers["IntelliTaggerEditTagsTemplate"] = 
 "<!--\n"+
 "{{{\n"+
 "-->\n"+
 "<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+
 "<div class='title' macro='view title'></div>\n"+
 "<div class='tagged' macro='tags'></div>\n"+
 "<div class='viewer' macro='view text wikified'></div>\n"+

 "<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+
 "<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>\n"+
 "<!--\n"+
 "}}}\n"+
 "-->\n"; 
 
config.shadowTiddlers["BSD open source license (abego Software)"] = "See [[Licence|http://tiddlywiki.abego-software.de/#%5B%5BBSD%20open%20source%20license%5D%5D]].";
config.shadowTiddlers["IntelliTaggerPlugin Documentation"] = "[[Documentation on abego Software website|http://tiddlywiki.abego-software.de/doc/IntelliTagger.pdf]].";
config.shadowTiddlers["IntelliTaggerPlugin SourceCode"] = "[[Plugin source code on abego Software website|http://tiddlywiki.abego-software.de/src/Plugin-IntelliTagger-src.js]]";
 
setStylesheet(store.getTiddlerText("IntelliTaggerStyleSheet"),"intelliTagger");

} // of single install

// Used Globals (for JSLint) ==============
// ... JavaScript Core
/*global alert, document, setTimeout, setInterval */
// ... TiddlyWiki Core
/*global Story, Tiddler, TiddlyWiki, addEvent, applyHtmlMacros, createTiddlyButton, createTiddlyElement, ensureVisible, findPosX, findPosY, findScrollX, findScrollY, findWindowHeight, findWindowWidth, onClickTag, refreshElements, resolveTarget, story */

<<list filter [tag[internship]]>>
Prof. Gª Garrido, Javier
On-Site Director
Coordinación de Grupos
Wake Forest University en Salamanca
C/ Toro, 84-90, Oficina 6
37001 Salamanca
Telf: (+34) 923 21 24 66
Móvil/cell: (+34) 655 61 23 98
garrido@wfu.edu
javier.g.garrido@gmail.com
/***
|Name|JumpToTopMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#JumpToTopMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a toolbar command and a macro, that create a button for quickly jumping to the top of your TW.
Handy to place in the tiddler toolbar (edit the ViewTemplate)

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

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

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

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

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

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

config.commands.top.handler = function(event,src,title)
{
               window.scrollTo(0,0);
}
//}}}
Known for its non-stop night life and congenial, open atmosphere, Madrid is one of Europe's most exciting cities. Made capital by Philip II in 1561 during the country's Golden Age, Madrid is the nation's melting pot where the peoples and cultures of the entire nation converge to create a unique metropolis. Take in the works at one of the world's greatest art museums at the Prado; review centuries of Spanish rule at the awesome Royal Palace; stroll through the pleasant gardens of the sprawling Retiro park in the middle of the city; see traditional and contemporary Spanish dance, cinema and drama in the country's leading theaters; enjoy drinks and typical fare in the breathtaking Plaza Mayor, just a few steps away from the official center of the country in the Puerta del Sol from which all distances are measured; learn why madrileños favorite phrase is "de Madrid al cielo" or "from Madrid to heaven" Madrid is Spain's New York and Washington rolled into one: a political epicenter chosen for its central location, a megalopolis where people from every corner of the country create a cultural collage of all things Spanish.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/madrid_palacio_real.jpg]]
| [[Overview]] | [[City-Tour]] | [[Instruction and Courses]] | [[Calendar]] | [[Trips and cultural activities]] | <html><a href="http://studyabroad.wfu.edu/index.cfm?FuseAction=Programs.ViewProgram&amp;Program_ID=04017148757A0B07707700021A7702090F140F7B760E1C71737472037B727077757707037A7B0B&amp;Type=O&amp;sType=O"><span style="color: white"><strong>Aplication Form</strong></span></a></html> | [[Student's Guide]] | [[Parents Page]] | [[Other]] | [[Contact]] | <<search>> |bgcolor(#E7DCBA):<<tiddler ToggleRightSidebar>> |


<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<!--}}}-->

<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b><html><img align="absmiddle" alt="" src="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/wfu_univ_h_gold-temp.gif" /><span style="color: rgb(221, 187, 68);"> </span><span style="color: rgb(0, 0, 0);">Study Abroad Program in Salamanca, Spain</span></html></b><br> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
We will visit Spain's often overlooked outback, the rugged and austere Extremadura whose name ("extremely hard") captures the spirit of this stark land. Step back two millennia to see some of Europe's best-preserved Roman ruins. Mérida offers a window back to the world of a provincial Roman capital during the peak of the world's largest Empire. Tour the amphitheatre and circus and the bridge crossing the Guadiana River. You would have to go to Italy to see better-preserved ruins and feel closer to the Empire than this. Mérida is one of Spain's most vivid illustrations of the Roman roots of the Spanish nation and Hispanic culture worldwide.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/meridas.jpg]]
* ''Una revista de los estudiantes de Wake Forest University en Salamanca (Fall 2008): http://users.wfu.edu/hardcaae/salamanca/'' 

* ''Wake Forest University Center in Salamanca:''
<html><table style="width:194px;"><tr><td align="center" style="height:194px;background:url(http://picasaweb.google.com/f/img/transparent_album_background.gif) no-repeat left"><a href="http://picasaweb.google.es/javierggarrido/WakeForestCenter?authkey=C1GT90eoHWU#"><img src="http://lh5.ggpht.com/javierggarrido/SMkARwZ1bcE/AAAAAAAAGRc/37VTmh0dQIo/s160-c/WakeForestCenter.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="http://picasaweb.google.es/javierggarrido/WakeForestCenter?authkey=C1GT90eoHWU#" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Wake Forest Center</a></td></tr></table>
<object src="http://www.gmodules.com/ig/ifr?url=http://aovechki.googlepages.com/p-album.xml&amp;up_rss=http%3A%2F%2Fpicasaweb.google.es%2Fdata%2Ffeed%2Fbase%2Fuser%2Fjavierggarrido%2Falbumid%2F5244723546100690369%3Falt%3Drss%26kind%3Dphoto%26authkey%3DC1GT90eoHWU%26hl%3Des&amp;up_delay=5000&amp;up_size=288&amp;up_desc=1&amp;synd=open&amp;w=320&amp;h=200&amp;title=Picasa+Album+Shuffle&amp;border=%23ffffff%7C0px%2C1px+solid+%23ffdd00%7C0px%2C2px+solid+%23ffdd33%7C0px%2C2px+solid+%23ffee99&amp;output=js"></object></html>
<html><p style="text-align: center;"><img hspace="10" align="right" style="width: 405px; height: 269px;" alt="Plaza Mayor at night" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/index_clip_image001.jpg" /></p> <p>The Department of Romance Languages of Wake Forest University sponsors a study abroad program at the University of Salamanca, Spain, one of the oldest and most prestigious universities in Europe.  The semester or year director is a Wake Forest professor who remains with the group and overseas the academic aspects of the program for the period of his/her directorship.  WFU in Salamanca features a very competitive study abroad package. At the cost of regular Wake Forest tuition, room and board , the program covers round-trip airfare to Spain (up to $ 1300), full room and board, laundry, internet access, all classes, textbooks, and all group trips. Other programs may seem less expensive, but hidden costs make their prices deceptive.  WFU in Salamanca offers a proven, high-quality academic program and an impressive travel itinerary, all based in one the world's most popular sites for Spanish study.</html>
----
*[[Duration]]
*[[Application Deadlines]]
*[[Eligibility]]
*[[Cost]]
*[[Scholarships]]
*[[Instruction and Courses]]
*[[Accommodations]]
*[[Trips and cultural activities]]
*[[Personal Travel]]
When you pack, keep in mind: It is better to underpack than to take too much! You can buy most of what you need in Salamanca, so do not bring more than you can carry comfortably for a substantial distance!!! Do not take more than one large suitcase, a backpack (preferably a hiking-type pack with a detachable daypack, which you can use for day trips and classes), and a carry-on. If you can take even less - perhaps one medium suitcase with a hiking pack stuffed inside - great. It's not a bad idea to make a list in Spanish of the correct words for everything you will need to buy on arrival; that will make your first shopping trip much easier.

The weather in Salamanca varies from year to year. In January it can be brutally cold. Don't forget a winter coat and your mittens, hat and scarf! Bring clothes in solid, dark colours that you can mix and match easily, layer, and wear more than once before washing. Don't worry too much about trying to fit in by wearing certain articles; the fact that you are an American will be written across your face, and anything you wear will do little to help you mesh. However, you may feel more comfortable if your clothes at least blend in. Black is the staple wardrobe color in Spain, but it is amazing how similar their clothes are to current American styles with a rainbow of colours and styles. Focus on how to make your wardrobe mix and match best. On a more important note, be sure to bring comfortable shoes because you will be walking up to several miles every day.

Note on Laptops! As of the 2005-2006 year, students were advised to bring their laptops, following complaints about the inconvenience of completing academic work in internet facilities and on campus at the University. This policy change has been well received, and students are finding their laptops convenient. Note that you will NOT be using your laptop for internet access from home, but only for word processing and other academic applications. Bringing your laptop makes it even more important for you to pack light!
The new Wake Forest Center in Salamanca now offers you the option to access internet several hours a day

Clothes


Recommended for Girls:
2 pairs of dark pants
2-3 pair jeans (The Spanish wear jeans just as much as we do.)
3-4 long sleeved knit shirts
3-4 sweaters (lightweight, cardigans are better)
5-6 t-shirts (a couple nice ones and some old ones for sleep, exercise, or wearing under other clothes)
1 pair shorts OR 1 pair sweatpants/lounge pants (for sleeping or exercising)
10-14 pairs of underwear and socks
1 nice skirt or 1 pair of dress pants
1 dressy top for going out
1 pair tennis shoes
1 pair black dress shoes (bring something dressy but practical for walking - because that's how you'll be getting around!)
1 pair of waterproof, sturdy boots (optional)

Recommended for Guys
10-14 pairs of underwear and socks
1-2 pairs jeans
2 pairs dark slacks or nice khakis
3 long-sleeved shirts (at least one nice one)
2-3 sweaters or sweatshirts
5-6 t-shirts
1-2 pairs shorts or sweatpants (for sleeping/exercising)
1 tie
1 pair tennis shoes
1 pair dark shoes
1 pair waterproof, sturdy boots (optional)

Other essentials:
· Winter coat, hat (but leave the baseball caps at home, guys!), scarf, gloves, and a lightweight pair of long underwear (highly recommended - Salamanca winters are cold and very wet)
· Bathing suit
· House slippers (Your family will be appalled if you walk around the house barefoot)
· 1-2 towels that you can use and throw out at the end of the semester, and a washcloth or loofah
· Enough prescription medication to last for your time there
· Any over-the-counter medicine that you rely on or take regularly; for example, if you get frequent headaches and Motrin is the most effective medicine, bring a large bottle.
· An extra pair of contact lenses and your glasses
· If you need them, ethnic hair products and makeup. Hair and makeup products for black women are usually only available in the biggest cities, and even then they are hard to find. Although Spain has a growing immigrant population, Salamanca is not racially diverse, and Spain in general does not have the racial diversity of its neighbours like France and Portugal.
· A travel-sized amount of toothpaste, shampoo, etc. for your first few days. You can buy almost any toiletries you need once you're there.
· If you bring a hairdryer, curling iron, electric razor, etc. remember that you will need an adaptor to fit the European-style plugs, which have two round prongs. Once in Spain, you may also need to get a volt converter to prevent blowing out your appliance, since Spanish electricity is at a higher voltage than in the U.S. (220V) You can buy adaptors in luggage and hardware stores in the US and converters (which cost around $15) at most electrical appliance stores in Spain. You may find it easier to buy a cheap hairdryer, etc., in Spain - it will save room in your suitcase and the cost will be similar to, or even cheaper than, buying adaptors and converters.
· A travel, battery-operated alarm clock
· A camera + adaptor and film
· A portable CD or tape player with headphones or travel speakers, and lots of extra batteries. You can buy a CD player and batteries in Spain, but electronics tend to be a little more expensive.
· A couple of your favourite CDs or tapes (if you can burn your own CDs, pick out your favourite songs and make a couple of travel CDs)
· A money wallet or pouch for carrying cash or traveler's checks under your clothes
· A couple pictures of your family and hometown to show your host family.
· A small housewarming-style gift for your host family - this could be a nice set of dishtowels, a candle, a book of pictures of your home state, candy, etc. Try to pick something that reflects who you are, your interests, or where you are from.

Not essential, but recommended:
· A good paperback Spanish/ English dictionary
· A Spain guidebook - Lonely Planet, Let's Go, or Rick Steve's are all good choices. Lonely Planet seems to be very oriented towards college students and their budgets! A very good choice. Rick Steve's does not include all Spanish cities, but he gives good opinions on what to see and what you can skip which can be useful in planning trips. You can find some guidebooks at the WF Center library.
· Maps of cities you plan to visit outside of Spain, the office of tourism has maps of Spanish cities available at no charge
· The addresses of all your friends and family that you may want to write
· And of course, don't forget your toothbrush! Je

Don't bring:
More than three pairs of shoes

Uncomfortable shoes or very delicate clothes - remember you will be walking several miles every day, and washing and wearing the same clothes again and again

Anything valuable or irreplaceable

Books, especially hardbacks. The WF Center library now has the text books for 217, 218, 219 and 220. A conversation book is useful if it contains a lot of vocabulary. Bilingual dictionaries and other resources can be found in most bookstores and libraries (remember, Salamanca is serving a huge international student population).

When packing, remember that you really can buy anything you need in Salamanca. I know it's on the other side of the world, but you can find everything you need usually with the same brands here. I also advise making a group trip to Carrefour, the European version of Wal-Mart, one of the first afternoons you get there. It's a bit of a walk, (straight up Calle Zamora), but it's an easy place to pick up all of the essentials you need or forgot.

Also, the Spanish do not like to waste electricity, so be very careful about anything you bring that requires a plug. Bring battery operated alarm clocks instead of ones that need to be plugged in.

Once you get there
<div class='header' macro='gradient vert #ffcc66 #ffcc66'><div class='gradient'> 
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<div id='topMenu' refresh='content' tiddler='MainMenu'>
</div>
</div>
<div id='bodywrapper'>
<div id='sidebar'>
 <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
 <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
 <div id='messageArea'></div>
 <div id='tiddlerDisplay'></div>
</div>
<div id='displayFooter'></div>
</div>
<span style='display:none' macro='tiddler SiteStartup'></span>
<html><p><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="Word.Document" name="ProgId"><meta content="Microsoft Word 11" name="Generator"><meta content="Microsoft Word 11" name="Originator"><link href="file:///C:\DOCUME~1\Javier\CONFIG~1\Temp\msohtml1\01\clip_filelist.xml" rel="File-List" /><o:smarttagtype name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="PlaceName" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="PlaceType" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="country-region" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning />
  <w:ValidateAgainstSchemas />
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables />
   <w:SnapToGridInCell />
   <w:WrapTextWithPunct />
   <w:UseAsianBreakRules />
   <w:DontGrowAutofit />
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><!--[if !mso]><object
 classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]--><style type="text/css">
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:EN-US;
	mso-fareast-language:EN-US;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:196967919;
	mso-list-type:hybrid;
	mso-list-template-ids:387629684 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l1
	{mso-list-id:861437625;
	mso-list-type:hybrid;
	mso-list-template-ids:-1654108494 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l2
	{mso-list-id:1217663561;
	mso-list-type:hybrid;
	mso-list-template-ids:1914595066 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l3
	{mso-list-id:1218198442;
	mso-list-type:hybrid;
	mso-list-template-ids:1099074684 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l3:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l4
	{mso-list-id:1234123263;
	mso-list-type:hybrid;
	mso-list-template-ids:1114255876 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l4:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l5
	{mso-list-id:2003046714;
	mso-list-type:hybrid;
	mso-list-template-ids:265817838 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l5:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]--></meta></meta></meta></meta></p><p style="text-align: left;" class="MsoNormal"><b style=""><span lang="EN-US"><span style="font-size: larger;">A Page Dedicated to the Parents of Students Participating in the </span><st1:placename w:st="on"><span style="font-size: larger;">Wake</span></st1:placename><st1:placetype w:st="on"><span style="font-size: larger;">Forest</span></st1:placetype><span style="font-size: larger;"> Study Program in </span><st1:city w:st="on"><st1:place w:st="on"><span style="font-size: larger;">Salamanca</span></st1:place></st1:city><o:p></o:p></span></b><span lang="EN-US"><o:p><br /></o:p></span></p>    <p class="MsoNormal"><span lang="EN-US">Welcome, parents, to <st1:placename w:st="on">Wake</st1:placename> <st1:placetype w:st="on">Forest</st1:placetype> <st1:placetype w:st="on">University</st1:placetype> in <st1:place w:st="on"><st1:city w:st="on">Salamanca</st1:city></st1:place> and congratulations on your child being accepted to the Salamanca Program!</span><span lang="EN-US"><o:p><br /></o:p></span></p>    <p class="MsoNormal"><span lang="EN-US">A semester of wonderful academic, travel, and life-changing experiences awaits your son or daughter!<span style="">&nbsp; </span></span><span lang="EN-US"><o:p><br /></o:p></span></p>    <p style="text-align: justify;" class="MsoNormal"><span lang="EN-US">We have created this page to help you, Parents, understand the program and to answer some questions that have come up often. While it is essential for you to be informed about procedures and other aspects of the program, it is the responsibility of your son or daughter to be fully informed about the program, about what it offers as well as about it is expected of him or her as participant in this study abroad opportunity in which s/he will also represent Wake Forest abroad.<span style="">&nbsp; </span></span></p><p><span lang="EN-US"><o:p></o:p></span><b style=""><span lang="EN-US">I. Trip Requirements<o:p></o:p></span></b></p><p class="MsoNormal"><span lang="EN-US">For a semester abroad, all students must have:</span></p>  <ul type="disc" style="margin-top: 0cm;"><li style="" class="MsoNormal"><span lang="EN-US">A valid <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region>      passport that will not expire for at least one year beyond the semester      abroad.<span style="">&nbsp; </span><a href="http://www.state.gov">www.state.gov</a></span></li><li style="" class="MsoNormal"><span lang="EN-US">a student visa issued from the Spanish consulate (the visa      requires an in-person visit to a Spanish consulate in the <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region> and can      take up to 10 weeks to acquire) <a href="http://www.maec.es/es/EYC/Paginas/embajadasyconsulados.aspx">link to consulate site</a><br /></span></li><li style="" class="MsoNormal"><span lang="EN-US">WFU approved international travel insurance (This insurance      covers some basic health care and repatriation costs.<span style="">&nbsp; </span>You should also contact your current      provider for information on health care while abroad.) www.inext.com</span></li></ul>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">II.<span style="">&nbsp; </span>What is included in the program costs?<o:p></o:p></span></b></p>  <ul type="disc" style="margin-top: 0cm;"><li style="" class="MsoNormal"><span lang="EN-US">Tuition for a full semester of courses, or for two semesters if      your child stays in <st1:city w:st="on"><st1:place w:st="on">Salamanca</st1:place></st1:city>      for both fall and spring semesters.</span></li><li style="" class="MsoNormal"><span lang="EN-US">Homestay (students live with Spanish families. We do our best      to match students with their requests regarding pets, children, and family      members in the home. In case of allergies, the family is fully informed      and the necessary arrangements are made)<span style="">&nbsp;      </span>Includes: student&rsquo;s own room, laundry services, and three meals per      day.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">Travel: up to $1300 to cover the roundtrip airfare ticket.</span></li><li style="" class="MsoNormal"><span lang="EN-US">Three group trips&mdash;two at 4 days each and one at 10 days&mdash;to      destinations in <st1:country-region w:st="on"><st1:place w:st="on">Spain</st1:place></st1:country-region>.<span style="">&nbsp; </span>During these trips, students stay in      centrally-located, quality hotels. Travel also includes all entrance fees,      guides and other costs associated with visits to monuments, museums or      cultural sites.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">Meals: Students receive 3 meals a day in homestay and, on group      trips, some group meals plus a per diem allowance for other meals.</span></li><li style="" class="MsoNormal"><span lang="EN-US">Textbooks. The WFU Salamanca director will arrange for the      purchase of all course textbooks for students. </span></li></ul>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">III. Safety<o:p></o:p></span></b></p>  <p style="text-indent: 36pt; text-align: justify;" class="MsoNormal"><span lang="EN-US">As we have learned even in the <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region>, no corner of the world is completely safe from terrorist activity.<span style="">&nbsp; </span>That said, <st1:place w:st="on"><st1:country-region w:st="on">Spain</st1:country-region></st1:place> continues to be a relatively safe destination for students and tourists.</span></p>  <p style="text-indent: 36pt; text-align: justify;" class="MsoNormal"><st1:city w:st="on"><st1:place w:st="on"><span lang="EN-US">Salamanca</span></st1:place></st1:city><span lang="EN-US"> is largely a &ldquo;college town&rdquo; of about 180,000 inhabitants.<span style="">&nbsp; </span>It is a small city with a low crime rate.<span style="">&nbsp; </span>Students should take common sense steps to avoid being the victims of pick-pocketing, the most common crime, and be sensible of their surroundings late at night.<span style="">&nbsp; </span></span></p>  <p style="text-indent: 36pt; text-align: justify;" class="MsoNormal"><span lang="EN-US">Alcohol:<span style="">&nbsp; </span>Our students can legally drink alcohol in <st1:country-region w:st="on"><st1:place w:st="on">Spain</st1:place></st1:country-region>, and may chose to do so.<span style="">&nbsp; </span>Students who abuse alcohol, however, are especially susceptible to theft or assault as well as personal injury.<span style="">&nbsp; </span>Students are discouraged from drinking excess alcohol for both health and safety reasons.<span style="">&nbsp; </span>Documented incidents of alcohol abuse may lead to expulsion from the program and return to the <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region> at the student&rsquo;s expense. Illegal drug use will necessitate expulsion.<span style="">&nbsp; </span>Prior to departure, students are asked to read and sign a memorandum on alcohol where policy about alcohol is explained in detail. [link to alcohol policy? Or statement here of one-warning].</span></p>  <p style="text-indent: 36pt;" class="MsoNormal"><span lang="EN-US">Students receive an International SOS safety document from the CIS (center for International Studies) which they should carry with them at all times.</span> <span lang="EN-US">They are also given some important contact numbers, as follows:</span></p>    <p class="MsoNormal"><span lang="EN-US">Academic Director&rsquo;s office number: (011) 34 923 21 50 75<br /></span></p>  <p class="MsoNormal"><span lang="EN-US">Spanish cell: (011) 34 622 11 69 34<br /></span></p>  <p class="MsoNormal"><span lang="EN-US">On-site Director&rsquo;s number: </span><span lang="EN-US">(011) 34 622 11 69 33</span></p>  <p class="MsoNormal"><span lang="EN-US">WFU police number: <a href="http://www.wfu.edu/police/dir.html">www.wfu.edu/police/dir.html</a><br /></span></p>  <p class="MsoNormal"><st1:placename w:st="on"><span lang="EN-US">Wake</span></st1:placename><span lang="EN-US"> <st1:placetype w:st="on">Forest</st1:placetype> Centro in <st1:city w:st="on"><st1:place w:st="on">Salamanca</st1:place></st1:city>: </span><span lang="EN-US">(011) 34 923 21 24 66 <br /></span></p>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">IV.<span style="">&nbsp; </span>Finances<o:p></o:p></span></b></p>  <ul type="disc" style="margin-top: 0cm;"><li style="" class="MsoNormal"><span lang="EN-US">The easiest way to access money from the <st1:country-region w:st="on">US</st1:country-region> in <st1:country-region w:st="on"><st1:place w:st="on">Spain</st1:place></st1:country-region> is through the use of an      ATM card.<span style="">&nbsp; </span>Machines are ubiquitous      and accept all the major debit systems (pulse, cirrus, etc.).<span style="">&nbsp; </span>Money can be deposited to a <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region> account      and available very rapidly to your student&rsquo;s ATM card.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">Major credit cards like Visa and Master Card are widely      accepted.<span style="">&nbsp; </span>American Express is also      accepted at many places.<span style="">&nbsp; </span>Other      cards may not be as usable.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">Your student&rsquo;s living, eating, and academic expenses are paid      for by the program. <span style="">&nbsp;</span>S/he will      likely want some money for personal expenses (from toiletries to snacks to      clothes) and for personal travel on weekends.<span style="">&nbsp; </span>Whatever your student needs on WFU      campus (minus gas money&mdash;in <st1:city w:st="on">Salamanca</st1:city>, we      walk!), is probably a good starting budget for <st1:city w:st="on"><st1:place w:st="on">Salamanca</st1:place></st1:city>. Without including money for      additional travel, a modest budget would be about 20 euros a week, a      comfortable budget 50 euros a week, and a luxury budget, 100 euros a      week.<span style="">&nbsp;&nbsp; </span></span></li></ul>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">V.<span style="">&nbsp; </span>Cell Phones<o:p></o:p></span></b></p>  <ul type="disc" style="margin-top: 0cm;"><li style="" class="MsoNormal"><span lang="EN-US">Most students purchase a Spanish cell phone once they arrive in      <st1:country-region w:st="on"><st1:place w:st="on">Spain</st1:place></st1:country-region>      as the most economical way to keep in touch.<span style="">&nbsp; </span>It will take a few days after arrival      for your student to get a cell phone, but most students find the process      quick and convenient.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">In our experience, US cell phones with international access      plans/charges turn out to be much more expensive than local phones and      plans.<span style="">&nbsp; </span>Some students have      discovered that the other students won&rsquo;t call them on their      US-International phone because it costs the caller extra minutes.<span style="">&nbsp; </span></span></li></ul>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">VI.<span style="">&nbsp; </span>Packages and Mailing<o:p></o:p></span></b></p>  <ul type="disc" style="margin-top: 0cm;"><li style="" class="MsoNormal"><span lang="EN-US">Although most students maintain contact with family and friends      at home through email and online voice/video options, there are times when      you may need to send something in postal mail.<span style="">&nbsp; </span>Our best recommendation is to send to      your student&rsquo;s homestay address, as s/he is likely to receive it more      rapidly.<span style="">&nbsp; </span></span></li><li style="" class="MsoNormal"><span lang="EN-US">Packages should also be sent to the homestay address unless      there is a special reason to send to the Centro.<span style="">&nbsp; </span>Packages containing valuable items      (especially electronics) may incur customs taxes that will have to be paid      when delivered.<span style="">&nbsp; </span></span></li></ul>  <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>  <p class="MsoNormal"><b style=""><span lang="EN-US">VII. Travel and Visits by Family/Friends<o:p></o:p></span></b></p>  <ul type="disc" style="margin-top: 0cm;"><li><span lang="EN-US">WFU Salamanca organizes three group trips during the      semester.<span style="">&nbsp; </span>These trips are      considered an essential part of the educational and cultural experience      for students; all students are required to participate in the official group      trips, and the group is required to remain together for tours of visited      sites.<span style="">&nbsp;&nbsp;&nbsp; </span></span></li><li><span lang="EN-US">We ask that friends and family not make plans to visit during      our scheduled group trips. We will not be able to include extra persons in      the transportation, hotel rooms, tour fees, or group meals.<span style="">&nbsp; </span>Please check the calendar for group trip      dates and plan your visit accordingly. You might also check with your      student&rsquo;s academic schedule (mid-term and final exam periods) for the best      time to visit.<span style="">&nbsp; </span><span style="">&nbsp;&nbsp;</span></span></li><li><span lang="EN-US">We DO welcome you to visit <st1:place w:st="on"><st1:city w:st="on">Salamanca</st1:city></st1:place>, however, we cannot ask      homestay families to accommodate other people in their homes.<span style="">&nbsp; </span><st1:city w:st="on"><st1:place w:st="on">Salamanca</st1:place></st1:city>      has a number of nice lodging options in a range of prices.<span style="">&nbsp; </span>Our recommendations are (<a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=es&amp;msa=0&amp;msid=108184080323167150547.0000011307bf0ae18afd4&amp;ll=40.963988,-5.659118&amp;spn=0.022587,0.043774&amp;z=15">link</a>)</span></li><li><span lang="EN-US">Staying for a week or two?<span style="">&nbsp;      </span>Some of our parents have enjoyed taking a few hours of class in      conversational Spanish.<span style="">&nbsp; </span>(</span><ol><li><span lang="EN-US"><a href="http://www.learningspanish-spain.com/">www.learningspanish-spain.com/</a><br /></span></li><li><span lang="EN-US"><a href="http://www.donquijote.org/">www.donquijote.org/</a></span></li><li><a href="http://www.enfoidiomas.com/salamanca.html">www.enfoidiomas.com/salamanca.html</a></li><li><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=es&amp;msa=0&amp;ll=40.963632,-5.659161&amp;spn=0.04673,0.087547&amp;z=14&amp;msid=108184080323167150547.00046398a67c378839fd0">map</a></li></ol></li><li><span lang="EN-US">Other stuff to do in <st1:city w:st="on"><st1:place w:st="on">Salamanca</st1:place></st1:city>?<span style="">&nbsp;&nbsp;</span><span style=""> </span></span><ul type="disc" style="margin-top: 0cm;"><li><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=es&amp;msa=0&amp;ll=40.963762,-5.664589&amp;spn=0.011683,0.021887&amp;t=h&amp;z=16&amp;msid=104504735721491388711.000001137940ba162f358"><span lang="EN-US">Monuments</span></a></li><li><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=108184080323167150547.00046398d083c0496cd20&amp;ll=40.963988,-5.66268&amp;spn=0.022587,0.043774&amp;t=h&amp;z=15">Museums</a></li></ul></li></ul></html>
Students have ample time during the program's standard week-end to travel to many destinations in Spain and Portugal. However, time does not allow for participants to make longer trips in Europe. More extensive trips should be scheduled prior to or following the program, when friends and family will be able to join students as well.
/***
|''Name:''|PlasticCalendarPlugin|
|''Description:''|This plugin creates a custom Gregorian calendar|
|''Version:''|1.3.1|
|''Date:''|Mar 13, 2007|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Author:''|Paulo Soares (psoares (at) math (dot) ist (dot) utl (dot) pt)|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description
This plugin creates a custom Gregorian calendar. A single month calendar has navigation buttons at the top line in order to change month and year. With multiple months the calendar is static. Different categories of holidays can be defined in a configuration tiddler and those categories can be styled by the user. There's also a simple scheduling mechanism.
This plugin is based on previous work by [[TiagoDionízio|http://mega.ist.utl.pt/~tngd/twiki/twiki.cgi/]]'s.
!Usage
Copy this tiddler to your TW, tag it with 'systemConfig', save your TW, refresh your browser and drop {{{<<calendar>>}}} in a tiddler to get a calendar for the current month. You can also use any of the following options {{{<<calendar year:2007 month:6 numberMonths:6 numberColumns:2 tag:'work'>>}}}.

You can also label the schedules with multiple tags separating them with {{{#}}} such as {{{tag:'work#excludeLists'}}}. However only the first tag is used to display scheduled days in the calendar.
!Revision history
1.3.1 - 19/03/2006
*fixed missing schedules at the first day of any month (bug reported and fixed by Michael Lin)
1.3.0 - 18/09/2006
*small changes to work with TW2.1
1.2.1 - 04/06/2006
*restored the use of multiple tags
1.2.0 - 18/05/2006
*plugin name changed to PlasticCalendarPlugin (because there are other ~CalendarPlugin's out there...)
*now using named parameters
*added categories of holidays (suggested by Paco Rivière)
1.1.0 - 02/10/2005
*initial release
!Code
***/
{{{
// --------------------------------------------------------------------
// Calendar
// --------------------------------------------------------------------

config.macros.calendar = {holidays: []};
config.macros.calendar.options = {
 // day week starts from (normally 0-Lu or 1-Do)
 calendarWeekStart: 1,
 calendarToday: "Today",
 calendarHoliday: "Holiday: ",
 calendarLongDateFormat: "YYYY/0MM/0DD",
 calendarShortDateFormat: "0DD/0MM",
 calendarTag: ["schedule"]
};

/***************************************************************************
** Internal functions
***************************************************************************/
var cldTag;

config.macros.calendar.calendarIsHoliday = function(date) {
 var cm = config.macros.calendar;
 var longHoliday = date.formatString(cm.options.calendarLongDateFormat);
 var shortHoliday = date.formatString(cm.options.calendarShortDateFormat);
 for(var i = 0; i < cm.holidays.length; i++) {
 if(cm.holidays[i][0] == longHoliday || cm.holidays[i][0] == shortHoliday) {
 return cm.holidays[i];
 }
 }
 return null;
}

config.macros.calendar.onClickOtherDay = function(e) {
 var day = this.getAttribute('tiddlylink');
 story.displayTiddler(null,day,DEFAULT_EDIT_TEMPLATE);
 for(var i=0; i<cldTag.length;i++){
 story.setTiddlerTag(day, cldTag[i], 0);
 }
 story.focusTiddler(day,"text");
}

config.macros.calendar.getPopupText = function(title) {
 var popup_entries = store.getTiddlerText(title).split("\n");
 var popup = popup_entries[0];
 if(popup_entries.length>1) popup += " ...";
 return popup;
}

config.macros.calendar.findCalendar = function(child) {
 var parent;
 while (child && child.parentNode) {
 parent = child.parentNode;
 if (parent.id == "calendarWrapper") {
 return parent;
 }
 child = parent;
 }
 return null;
}

config.macros.calendar.selectDate = function(e) {
 if (!e) var e = window.event;
 var cm = config.macros.calendar;
 var calendar = cm.findCalendar(this);
 if (calendar) {
 var d = this.getAttribute("date");
 if (d != null) cm.makeCalendar(calendar, new Date(new Number(d)));
 }
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
}

config.macros.calendar.makeCalendar = function(calendar, dt_current) {
 var cm = config.macros.calendar;
 var currentDay = new Date(new Number(calendar.getAttribute("currentDay")));
 var setControls = calendar.getAttribute("setControls");
 calendar.setAttribute("date", dt_current.valueOf());

 while (calendar.hasChildNodes())
 calendar.removeChild(calendar.firstChild);

if(setControls==1){
 // get same date in the previous year
 var dt_prev_year = new Date(dt_current);
 dt_prev_year.setFullYear(dt_prev_year.getFullYear() - 1);
 if (dt_prev_year.getDate() != dt_current.getDate())
 dt_prev_year.setDate(0);

 // get same date in the next year
 var dt_next_year = new Date(dt_current);
 dt_next_year.setFullYear(dt_next_year.getFullYear() + 1);
 if (dt_next_year.getDate() != dt_current.getDate())
 dt_next_year.setDate(0);

 // get same date in the previous month
 var dt_prev_month = new Date(dt_current);
 dt_prev_month.setMonth(dt_prev_month.getMonth() - 1);
 if (dt_prev_month.getDate() != dt_current.getDate())
 dt_prev_month.setDate(0);

 // get same date in the next month
 var dt_next_month = new Date(dt_current);
 dt_next_month.setMonth(dt_next_month.getMonth() + 1);
 if (dt_next_month.getDate() != dt_current.getDate())
 dt_next_month.setDate(0);
}

 // get first day to display in the grid for current month
 var dt_firstday = new Date(dt_current);
 dt_firstday.setDate(1);
 dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - cm.options.calendarWeekStart) % 7);

 var area, header;
 var line, cell, i;

 // 1 - calendar header table
 // 2 - print weekdays titles
 // 3 - calendar days table 
calendar.cellPadding = 0;
calendar.cellSpacing = 0;
area = createTiddlyElement(calendar, "tbody");

 // 1 - calendar header table
 header = createTiddlyElement(area,"tr", "calendarHeader");
 header.cellPadding = 0;
 header.cellSpacing = 0;

if(setControls==1){ 
var headerValues = [
 [ "<<", "selectYear", dt_prev_year.valueOf() ],
 [ "<", "selectMonth", dt_prev_month.valueOf() ],
 [ config.messages.dates.months[dt_current.getMonth()] + ' ' + dt_current.getFullYear(),
 "selectToday", currentDay.valueOf() ],
 [ ">", "selectMonth", dt_next_month.valueOf() ],
 [ ">>", "selectYear", dt_next_year.valueOf() ]
 ];

 for (i = 0; i < headerValues.length; ++i) {
 var link = createTiddlyElement(header,"td", null, null, headerValues[i][0]);
 if(i==2) link.colSpan=3;
 link.onclick = cm.selectDate;
 link.setAttribute("date", headerValues[i][2]);
 }
} else {
 var link = createTiddlyElement(header,"td", null, null, 
config.messages.dates.months[dt_current.getMonth()] + ' ' + dt_current.getFullYear());
link.colSpan=7;
}

 // 2 - print weekdays titles
 line = createTiddlyElement(area, "tr", "weekNames");
 for (var n = 0; n < 7; ++n) {
 createTiddlyElement(line, "td", null, null, config.messages.dates.shortDays[(cm.options.calendarWeekStart + n)%7]);
 }

 // 3 - calendar days table
 var dt_current_day = new Date(dt_firstday);
 var day_class;
 var title;
 var holiday;
 var popup;
 var clickHandler;

 while (dt_current_day.getMonth() == dt_current.getMonth() ||
 dt_current_day.getMonth() == dt_firstday.getMonth()) {

 // print row header
 line = createTiddlyElement(area, "tr", "calendarLine", null, null);
 for (var n_current_wday = 0; n_current_wday < 7; ++n_current_wday) {
 title = dt_current_day.formatString(cm.options.calendarLongDateFormat);
 clickHandler = cm.onClickOtherDay;
 popup = null;
 holiday = cm.calendarIsHoliday(dt_current_day);

 if (holiday != null) {
 // holidays
 day_class = (holiday.length==3)? holiday[2]: "holiDay";
 popup = cm.options.calendarHoliday + holiday[1];
 } else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6) {
 // weekend days
 day_class = "weekDay";
 } else {
 // print working days of current month
 day_class = "workingDay";
 }

if(dt_current_day.getMonth() == dt_current.getMonth()){
 if (currentDay.valueOf() == dt_current_day.valueOf()) {
 // print current date
 if (store.tiddlerExists(title)){
 // day has a tiddler associated with it
 day_class += " currentscheduledDay";
 clickHandler = onClickTiddlerLink;
 popup = cm.options.calendarToday + ": "+ cm.getPopupText(title);
 } else {
 day_class += " currentDay";
 popup = cm.options.calendarToday;
}
}


 if (store.tiddlerExists(title) && store.getTiddler(title).isTagged(cldTag[0]))  {
 // day has a tiddler associated with it
 day_class += " scheduledDay";
 clickHandler = onClickTiddlerLink;
 popup = cm.getPopupText(title);
 }
}

 // extra formatting for days of previous or next month
 if (dt_current_day.getMonth() != dt_current.getMonth()) {
 day_class += " otherMonthDay";
 }

 var text = dt_current_day.getDate();
 var cell = createTiddlyElement(line, "td", null, day_class, text);
 cell.onclick=clickHandler;
 cell.setAttribute("date", dt_current_day.valueOf());
 cell.setAttribute("tiddlyLink", title);
 if(popup) cell.setAttribute("title", popup);
 dt_current_day.setDate(dt_current_day.getDate()+1);
 }
 }
}

config.macros.calendar.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var start_date = new Array();
 var date = new Date();
 var cldParams = paramString.parseParams('calendarParams', null, true);
 var cldYear = (cldParams[0].year)?parseFloat(cldParams[0].year[0]): date.getFullYear();
 var cldMonth = (cldParams[0].month)?parseFloat(cldParams[0].month[0]): date.getMonth();
 var n_months = (cldParams[0].numberMonths)?parseFloat(cldParams[0].numberMonths[0]): 1;
 var n_cols = (cldParams[0].numberColumns)?parseFloat(cldParams[0].numberColumns[0]): 3;
 cldTag = (cldParams[0].tag)?cldParams[0].tag[0].split("#"): config.macros.calendar.options.calendarTag;
 for(var i = 0; i < n_months; i++){
 start_date[i] = new Date(cldYear, cldMonth+i, 1);
 }
 var n_rows = Math.max(1,Math.ceil(n_months/n_cols));
 n_cols = Math.min(n_cols,n_months);
 var setControls=(n_months>1)? 0: 1;
 var currentDay = new Date();
 currentDay = new Date(currentDay.getFullYear(), currentDay.getMonth(), currentDay.getDate());
 var holder = createTiddlyElement(place, "table", null,"calendarHolder");
 var holderTable = createTiddlyElement(holder, "tbody");
 for(var i = 0; i < n_rows; i++){
 var holderLine = createTiddlyElement(holderTable, "tr");
 for(var j = 0; j < n_cols; j++){
 var holderCell = createTiddlyElement(holderLine, "td");
 if(n_cols*i+j+1<=n_months){
 var calendar = createTiddlyElement(holderCell, "table", "calendarWrapper");
 calendar.setAttribute("name", "calendarWrapper");
 calendar.setAttribute("setControls", setControls);
 calendar.setAttribute("currentDay", currentDay.valueOf());
 config.macros.calendar.makeCalendar(calendar, start_date[n_cols*i+j]);
 }
 }
 }
}

function refreshCalendars(hint) {
 var calendars = document.getElementsByName("calendarWrapper");
 var i, c;
 for (i = 0; i < calendars.length; ++i) {
 c = calendars.item(i);
 if (c.id == "calendarWrapper") {
 config.macros.calendar.makeCalendar(c, new Date(new Number(c.getAttribute("date"))));
 }
 }
}

store.addNotification(null, refreshCalendars);

setStylesheet("/***\n!Calendar Styles\n***/\n/*{{{*/\n .viewer .calendarHolder {\n margin-left: auto;\n margin-right: auto;\n border: none;\n}\n\n .viewer .calendarHolder table {\n border: none;\n margin: 0;\n}\n\n .viewer .calendarHolder tr {\n border: none;\n vertical-align: top;\n}\n\n .viewer .calendarHolder td {\n border: none;\n vertical-align: top;\n}\n\n .viewer #calendarWrapper {\n width: 21em;\n border: 2px solid #4682b4;\n cursor: pointer;\n}\n\n #calendarWrapper #calendarLine td {\n height: 2.5em;\n}\n\n #calendarWrapper tr {\n border:none;\n}\n\n #calendarWrapper td {\n text-align: center;\n vertical-align: middle;\n width: 14.28%;\n border:none;\n}\n\n #calendarWrapper #calendarHeader td{\n color: #ffffff;\n background-color: #4682b4;\n height: 2em;\n}\n\n #calendarWrapper #weekNames td {\n color: #ffffff;\n background-color: #87cefa;\n height: 2em;\n}\n\n #calendarWrapper .weekDay {\n background-color: #ccff99;\n}\n\n #calendarWrapper .holiDay {\n background-color: #9acd32;\n}\n\n #calendarWrapper .currentDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .currentscheduledDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .workingDay {\n background-color: #ffffff;\n}\n\n #calendarWrapper .scheduledDay {\n border: solid orange 2px;\n}\n\n #calendarWrapper .otherMonthDay {\n background-color: #999;\n}\n\n/*}}}*/","CalendarStyles");
}}}
<html><img hspace="10" align="right" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image002.jpg" style="width: 327px; height: 219px;" alt="" /></html>Internships at the Spanish Red Cross are recommended for students with a good command of the language and special interest in medical and health professions.  The following are some of the areas in Red Cross where internships may take place: 
*Social Emergency Center. For any homeless person in need of a temporary place to stay and be cared for. This Center offers shelter, counseling, information, social and/or psychological attention.
* Transportation for people with disabilities. This service provides vehicles equipped to transport people with special needs to their places of work, relaxation, or group meetings.
* Daycare for the elderly: this service is offered for the elderly with a certain level of dependency.
* Youth Day Center. It provides an educational and social environment to prevent young people from engaging in undesirable behavior and to advise them regarding future employment.
* Learning in my Hometown: School children between the ages of 10 and 14 visit the Red Cross to learn about its facilities and installations. Interns would work with the children in areas such as solidarity, respect, tolerance and coexistence.
* Youth Red Cross:  Participants between the ages of 8 and up to 30 engage in activities related to health and to the prevention of violent behavior. It organizes educational meetings at schools about sexual behavior, drugs, and educational activities related to international development and cooperation.
Because Salamanca is a relatively safe and tranquil place, it is often easy to forget that you still need to be aware of your surroundings at all times. For both men and women, it is best to walk home late at night with others who live near you. If you live far away from the Plaza, talk to your director about the safest way to get home at night. It is most likely that the worst thing that could happen is some verbal heckling by drunken men or groups of other students, but you can never be too safe. Salamanca has its share of beggars, it is best not to give to them because it will only make them harass you more the next day. To deal with any heckling by groups of students, beggars, etc., the best approach is to keep walking and ignore them. "Déjame" or "Déjame en paz" (leave me alone!) will usually work if ignoring doesn't.

As a norm, you will not see people running for exercise through the streets. There are a number of parks throughout the city, but it is best if you do not go running alone at night, and exercise caution during the day. Parks are ideal spots for perverted youth and dirty old men to unleash their personal frustrations on young women. The area down by the River Tormes is considered unsafe after dark; be alert during the day as well and stay where there are lots of people around.

While traveling, remember that you will stick out as an American no matter where you go and thieves will take note of you. A money pouch that goes around your neck or a money belt is a must. In metros and crowded tourist areas a practiced thief can open your bag without your notice; you make want to take off your backpack and hold it in front of you. In restaurants, don't hang things on the back of your chair. It is also a good idea to keep money or ID (for museums etc.) in a convenient place to minimize the times you have to open your wallet. Some pensiones (boarding, lodging, guest houses) will have a safe for your passport, but it is best to keep in on you at all times. Speak Spanish within your group; although you are still obviously tourists, you will appear more aware of your surroundings and a less vulnerable target.

Many of the churches and other tourist sites will be surrounded by beggars and gypsies. One of their tricks is to give you a flower and then ask for money. Then, while you reach for your money, one person will distract you while another steals your wallet. They will also refuse to take the flower if you try to return it, and keep demanding money. The best way to avoid this is to refuse the flower (or whatever they're offering). They will be very persistent and continue to hassle you, but again ignoring them and a firm "¡No!" will usually do the trick.

The best advice is common sense. If an area looks unsafe it probably is, so trust your instincts. Above all, keep your wits about you and watch your back, especially when traveling out of Salamanca.

La Marcha (Nightlife, 1lpm - 9am)

It probably will not take you long to discover that Salamanca has an extremely active nightlife, with a per capita to bar ratio of 11:1. Salamanca is famous throughout Spain for its nightlife, attracting a pilgrimage of students every Thursday night to partake in weekend-long "bacchus." "¡Aprovéchate!" 
<html><!--[if !vml]--><span>         </span><!--[endif]--><span>         </span><span lang="EN-GB" style=""><span>&quot;Salamanca Acoge&quot; is a  		spanish national wide association that helps immigrants setting up their lives in a new city </span><o:p><span> and a new country. Immigrants have a lot of different needs such as cultural immersion, help with Spanish, out of school care for their children, occupational training, job-hunting tips, legal advising, awareness-raising about their problems, etc. All this fields will require your help and you will be welcome to take part in their team of co-workers. This internship is specially thought for Sociology students. </span><img width="400" vspace="6" hspace="6" height="300" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/inmigrantes.JPG" alt="EstivalTour" v:shapes="_x0000_s1048" /></o:p></span></html>
Students may apply for scholarships through the Center for International Studies at Wake Forest University
Our excursions will include a trip to the charming city of Segovia. Walk under the city's incredible aqueduct, which has traversed Segovia for 2000 years, one of the most stunning masterpieces of Roman engineering and one of the greatest architectural marvels in the world. Tour one of Europe's most painteresque medieval castles at the Alcázar. Climb a centuries-old staircase to enjoy unforgettable views of the Spanish landscape and the rivers Eresma and Clamores below. See the last Gothic cathedral in Spain, a beautiful 16th century church bare of sculptures and celebrated for its austere beauty. Segovia has all the history of a major capital with the feel of a small town.
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/segovia1.jpg]]
Andalucía's capital and largest city, Sevilla is a metropolis with the sharp flavor of a Southern Spanish town. Here tapas abound, the siesta is still religion and the boisterous and sociable people leave no doubt that you're in Spain. Walk along the Guadalquivir River where Spanish galleons sailed back loaded with gold and stories of a strange new world in the Americas centuries ago. See the Torre del Oro where the administrators of the conquest kept meticulous records of the conquistadors' voyages and their spoils. Gawk at the overwhelming cathedral, one of the world's largest, built with the riches from the Spanish conquest. Escape from the sun in one of the city's charming parks. Climb to the top of one of Spain's greatest architectural icons, the Arab Giralda where you can take in the entire city. Witness authentic Spanish flamenco dance and guitar in intimate bars where locals still take the stage to sing traditional Andalucian songs taught them by their grandparents. Sevilla is the site of the world-famous Feria de Abril or Spring Fair and Semana Santa or Holy Week at Easter. For both the entire city is turned upside down in a display of typical Andalucian dance, music, cuisine and merriment. Host to the World Expo in 1992, Sevilla is a modern, international city with a cozy, Andalucian ambiance that you will never forget. 
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/sevilla.jpg]]
You will be able to buy almost everything you need in Salamanca. There are a variety of stores on all the streets branching out from the plaza mayor. Aside from the regular clothing and shoe stores, you can buy school supplies in papelerías, books in librerías (check out the Librería Cervantes on Calle Azafranal - it has two shops on both sides of the street), and medicine and personal care items in farmacias (look for the neon green crosses). Keep your eyes open for rebajas - clearance sales. There is a Carrefour Express grocery store on Calle Toro, and the bottom level includes some school supplies, personal care items, and clothes. The mall, the Centro Comercial Tormes, is newly built and across the river - you can take a special bus. The European equivalent of Wal-mart, Carrefour, is in the north part of the city on Avenida Torres Villarroel and sells a bit of everything.
<<showClock>><<search>><<closeAll>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<calendar thismonth>><<permaview>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.displayTiddler(), Story.prototype.displayTiddlers()|
|Options|##Configuration|
|Description|Show tiddlers one at a time with automatic permalink, or always open tiddlers at top/bottom of page.|
This plugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one tiddler displayed at a time.
!!!!!Documentation
>see [[SinglePageModePluginInfo]]
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}.
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2008.06.12 [2.9.5] corrected 'scroll to top of page' logic in auto-scroll handling
| Please see [[SinglePageModePluginInfo]] for previous revision details |
2005.08.15 [1.0.0] Initial Release.  Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts.
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageMode= {major: 2, minor: 9, revision: 5, date: new Date(2008,6,12)};
//}}}
//{{{
config.paramifiers.SPM = { onstart: function(v) {
	config.options.chkSinglePageMode=eval(v);
	if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
		config.lastURL = window.location.hash;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
} };
//}}}
//{{{
if (config.options.chkSinglePageMode==undefined)
	config.options.chkSinglePageMode=true;
if (config.options.chkSinglePagePermalink==undefined)
	config.options.chkSinglePagePermalink=true;
if (config.options.chkSinglePageKeepFoldedTiddlers==undefined)
	config.options.chkSinglePageKeepFoldedTiddlers=false;
if (config.options.chkSinglePageKeepEditedTiddlers==undefined)
	config.options.chkSinglePageKeepEditedTiddlers=false;
if (config.options.chkTopOfPageMode==undefined)
	config.options.chkTopOfPageMode=false;
if (config.options.chkBottomOfPageMode==undefined)
	config.options.chkBottomOfPageMode=false;
if (config.options.chkSinglePageAutoScroll==undefined)
	config.options.chkSinglePageAutoScroll=true;
//}}}
//{{{
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
	if (!config.options.chkSinglePageMode)
		{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
	if (config.lastURL == window.location.hash) return; // no change in hash
	var tids=decodeURIComponent(window.location.hash.substr(1)).readBracketedList();
	if (tids.length==1) // permalink (single tiddler in URL)
		story.displayTiddler(null,tids[0]);
	else { // restore permaview or default view
		config.lastURL = window.location.hash;
		if (!tids.length) tids=store.getTiddlerText("DefaultTiddlers").readBracketedList();
		story.closeAllTiddlers();
		story.displayTiddlers(null,tids);
	}
}

if (Story.prototype.SPM_coreDisplayTiddler==undefined)
	Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
	var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
	var tiddlerElem=document.getElementById(story.idPrefix+title); // ==null unless tiddler is already displayed
	var opt=config.options;
	var single=opt.chkSinglePageMode && !startingUp;
	var top=opt.chkTopOfPageMode && !startingUp;
	var bottom=opt.chkBottomOfPageMode && !startingUp;
	if (single) {
		story.forEachTiddler(function(tid,elem) {
			// skip current tiddler and, optionally, tiddlers that are folded.
			if (	tid==title
				|| (opt.chkSinglePageKeepFoldedTiddlers && elem.getAttribute("folded")=="true"))
				return;
			// if a tiddler is being edited, ask before closing
			if (elem.getAttribute("dirty")=="true") {
				if (opt.chkSinglePageKeepEditedTiddlers) return;
				// if tiddler to be displayed is already shown, then leave active tiddler editor as is
				// (occurs when switching between view and edit modes)
				if (tiddlerElem) return;
				// otherwise, ask for permission
				var msg="'"+tid+"' is currently being edited.\n\n";
				msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
				if (!confirm(msg)) return; else story.saveTiddler(tid);
			}
			story.closeTiddler(tid);
		});
	}
	else if (top)
		arguments[0]=null;
	else if (bottom)
		arguments[0]="bottom";
	if (single && opt.chkSinglePagePermalink && !config.browser.isSafari) {
		window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitle") + " - " + title;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
	if (tiddlerElem && tiddlerElem.getAttribute("dirty")=="true") { // editing... move tiddler without re-rendering
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		if (!isTopTiddler && (single || top))
			tiddlerElem.parentNode.insertBefore(tiddlerElem,tiddlerElem.parentNode.firstChild);
		else if (bottom)
			tiddlerElem.parentNode.insertBefore(tiddlerElem,null);
		else this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	} else
		this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	var tiddlerElem=document.getElementById(story.idPrefix+title);
	if (tiddlerElem&&opt.chkSinglePageAutoScroll) {
		// scroll to top of page or top of tiddler
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		var yPos=isTopTiddler?0:ensureVisible(tiddlerElem);
		// if animating, defer scroll until 200ms after animation completes
		var delay=opt.chkAnimate?config.animDuration+200:0;
		setTimeout("window.scrollTo(0,"+yPos+")",delay); 
	}
}

if (Story.prototype.SPM_coreDisplayTiddlers==undefined)
	Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function() {
	// suspend single/top/bottom modes when showing multiple tiddlers
	var opt=config.options;
	var saveSPM=opt.chkSinglePageMode; opt.chkSinglePageMode=false;
	var saveTPM=opt.chkTopOfPageMode; opt.chkTopOfPageMode=false;
	var saveBPM=opt.chkBottomOfPageMode; opt.chkBottomOfPageMode=false;
	this.SPM_coreDisplayTiddlers.apply(this,arguments);
	opt.chkBottomOfPageMode=saveBPM;
	opt.chkTopOfPageMode=saveTPM;
	opt.chkSinglePageMode=saveSPM;
}
//}}}
This tiddler is included in the PageTemplate as a ''hidden SPAN''.  You can use it include macros or inline scripts that are automatically invoked whenever the document is loaded.
!!!!![[SetTiddlerColumns]]
<<<
sets the number of tiddler columns to display using the -moz-column-count, -moz-column-width, and -moz-column-gap CSS attributes (currently supported by Firefox only).
{{{<<tiddler SetTiddlerColumns>>}}}
<<tiddler SetTiddlerColumns>>
<<<
!!!!![[SetSidebarTabsHeight]]
<<<
sets a fixed or percentage height for the sidebar tabs, or 'auto' (default) to allow as much room it needs.
{{{<<tiddler SetSidebarTabsHeight>>}}}
<<tiddler SetSidebarTabsHeight>>
<<<
!!!!![[SetPopupsHeight]]
<<<
sets a fixed or percentage height for popup displays (e.g., tab popups), or 'auto' (default) to allow as much room needed.
{{{<<tiddler SetPopupsHeight>>}}}
<<tiddler SetPopupsHeight>>
<<<
!!!!![[SetStoryHeight]]
<<<
sets a fixed or percentage height for the story column, or 'auto' (default) to allow as much room as needed.
{{{<<tiddler SetStoryHeight>>}}}
<<tiddler SetStoryHeight>>
<<<
!!!!![[SetTiddlerHeight]]
<<<
sets a fixed or percentage height for each tiddler, or 'auto' (default) to allow each tiddler to use as much room as it needs.
{{{<<tiddler SetTiddlerHeight>>}}}
<<tiddler SetTiddlerHeight>>
<<<
!!!!![[ToggleSiteTitles]]
<<<
sets the visibility (//display:none// or //display:block//) of the SiteTitle/SiteSubtitle display area ('page titles', DOM ID=//header//)
{{{<<tiddler ToggleSiteTitles>>}}}
<<tiddler ToggleSiteTitles>>
<<<
!!!!![[ToggleSiteMenu]]
<<<
sets the visibility (//display:none// or //display:block//) of the SiteMenu display area ('menubar', DOM ID=//siteMenu//).
<script show>
// hide site menu by default
if (config.options.chkHideSiteMenu==undefined)
	config.options.chkHideSiteMenu="true";
</script>{{{<<tiddler ToggleSiteMenu>>}}}
<<tiddler ToggleSiteMenu>>
<<<
!!!!![[VisitCounter]]
<<<
tracks and displays a quick reminder of how many times you have viewed this document as well as the date and time of your last visit.  This information is stored privately in your browser using cookies (txtVisitCount and txtLastVisit), and are //never// accessible to any other parties.
{{{<<tiddler VisitCounter with: TiddlyTools>>}}}
<<tiddler VisitCounter with: TiddlyTools>>
<<<
!!!!![[ToggleLeftSidebar]], [[ToggleRightSidebar]] 
<<<
set the visibility (//display:none// or //display:block//) of the MainMenu ('left sidebar', DOM ID=//mainMenu//) and SideBarOptions ('right sidebar', DOM ID=//sidebar//) displays.
<script show>
	// default sidebar visibility
	if (config.options.chkShowLeftSidebar==undefined)
		config.options.chkShowLeftSidebar=true;
	if (config.options.chkShowRightSidebar==undefined)
		config.options.chkShowRightSidebar=false;
</script>
|{{{<<tiddler ToggleLeftSidebar>>}}} |<<tiddler ToggleLeftSidebar>> |
|{{{<<tiddler ToggleRightSidebar>>}}} |<<tiddler ToggleRightSidebar>> |
<<<
!!!!![[ToggleScrollingSidebars]]
<<<
sets 'position:fixed' for the sidebars, so that they remain fixed in place (aka, "hover") when the rest of the page content is scrolled.
{{{<<tiddler ToggleScrollingSidebars>>}}}
<<tiddler ToggleScrollingSidebars>>
<<<

<html><table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0"><tr><td><img align="absmiddle" src="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/wfu_univ_h_gold-temp.gif" alt="" /></td><td><font color="white">Study Abroad Program in Salamanca, Spain </font></td></tr></table></html>
/***

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

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

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

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

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

!Code
***/
//{{{
window.old_lewcid_splash_restart=window.restart;

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


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

''12-23 de enero''.: Curso Intensivo (lunes a viernes) 
''24-27 de enero''.: Viaje a Madrid (sábado a martes) 
''28 de enero''.: inicio del curso académico (miércoles) 
''12-15 de febrero'': viaje al Norte de España (jueves a domingo) 
''2-9 de abril'': Viaje a Andalucía (jueves a jueves)  
''30 de abril:'' último día de clases (jueves) 
''4-8 de mayo:'' Exámenes

''9 de mayo:'' Salida de España
''10 de mayo:'' llegada a USA
 
''Días festivos:''
''19 de marzo:'' San José
''3 a 13 de Abril:'' Semana Santa en la Universidad de Salamanca (''2-9 de abril'': Viaje a Andalucía)
''23 de abril:'' Día de Castilla y León
''1 de mayo:'' Día de los trabajadores 
<html><p><strong>NOTE:</strong><br />These dates are subject to change due to availability in hotels and transportation, reservations, etc.</p></html><<calendar year:2009 month:0 numberMonths:5 numberColumns:3>>
To downoad the full hadbook right click ''[[this link|http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/handbook.PDF]]'' and save it to your computer.

<html><object style="width:1024px;height:768px" ><param name="movie" value="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf?mode=embed&amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml&amp;documentId=090226185159-7890f0179fbc4f71b0bd288f180e79e5&amp;docName=salamanca_handbook_final&amp;username=wakeforest&amp;loadingInfoText=Student's%20guide" /><param name="allowfullscreen" value="true"/><param name="menu" value="false"/><embed src="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf" type="application/x-shockwave-flash" allowfullscreen="true" menu="false" style="width:1024px;height:768px" flashvars="mode=embed&amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml&amp;documentId=090226185159-7890f0179fbc4f71b0bd288f180e79e5&amp;docName=salamanca_handbook_final&amp;username=wakeforest&amp;loadingInfoText=Student's%20guide" /></object></html>
/***
!General
***/
/*{{{*/
body {
 background: #ff9900;
}

 #contentWrapper{
 background: #fff;
 border:1px solid #000;
 margin: 0 1em;
 padding:0;

height:1%;
}
/*}}}*/


/***
!Links
***/
/*{{{*/
a,
a.tiddlyLink,
a.button,
a.externalLink,
#sidebarOptions .sliderPanel a{
 color: #375669;
 text-decoration: none;
 background: transparent;
 border: 0;
}

a:hover,
a.tiddlyLink:hover,
a.button:hover,
a.externalLink:hover,
#sidebarOptions .sliderPanel a:hover
{
 border: 0;
 color: #1D65BC;
 text-decoration: underline;
background:transparent;
}
/*}}}*/

/***
!Header
***/
/*{{{*/
.gradient {margin-top:1em; background:#ff9900;}

.titleLine{padding: 30px 40px 15px 30px;}

.titleLine a:hover{color:#fff; border-bottom:1px dotted #eee; text-decoration:none;}

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

.siteTitle {
 font-size: 2.2em;
 font-weight: bold;
 color:#fff;
}

.siteSubtitle {
 font-size: 1.0em;
 display: block;
 margin: .3em auto 1em;
color:#fff;
}
/*}}}*/

/***
!TopMenu
***/
/*{{{*/
#topMenu br {display:none; }
#topMenu { background: #ff9900; font-size:1em; }
#topMenu { padding:5px 32px; }
#topMenu .button, #topMenu .tiddlyLink {
 margin-left:0.1em; margin-right:0.1em;
 padding:0.5em;
 color:black; font-weight:bold;
}
#topMenu a.button:hover, #topMenu a.tiddlyLink:hover { background:#fff; color:#333; text-decoration:none;}

 
/*}}}*/

/***
!Display
***/
/***
!!!Display General
***/
/*{{{*/


#displayArea { margin: 0em 15.7em 0em 0em; }

#displayFooter {
 clear: both;
}
/*}}}*/
/***
!!!Tiddler
***/
/*{{{*/
.tiddler {margin-bottom:1em; padding-bottom:1em;}

.tiddler {padding-left:1.5em;}

.title {color:#333; font-size:1.8em; border-bottom:1px solid #333; padding-bottom:0.3px;}

.subtitle { font-size:90%; color:#511536; padding-left:0.25em; margin-top:0.1em; }

.shadow .title {
 color: #000000;
}

h1,h2,h3,h4,h5 { color: #333; background: transparent; padding-bottom:2px; border-bottom: 1px dotted #666; }

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



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

.viewer a.button {color:#000; border:1px solid #511536; font-weight:bold;}

.viewer a.button:hover{color:#fff; background:#511536; text-decoration:none;}

.tagClear {clear:none;}
/*}}}*/
/***
!!!Editor
***/
/*{{{*/

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







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


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


.tiddler {border-bottom:3px solid #EEF1F3; padding-bottom:2em; padding-top:0em;}
.title {border-bottom:none; margin-right:8em;}

h1,h2,h3,h4,h5 { color: #333; background: transparent; padding-bottom:2px; border-bottom: none; }

#sidebar {background: #E7DCBA; right:0;}



#displayFooter {
 clear: both;
}

#tiddlerDisplay{padding-top:1em;}



#sidebar .tabSelected, #sidebar .tabSected:hover {
 color: #000;
 background: #dbdee3;
 border-top: solid 1px #B2B6BE;
 border-left: solid 1px #B2B6BE;
 border-right: solid 1px #B2B6BE;
 border-bottom:solid 1px #dbdee3 !important;
padding-bottom:1px;
text-decoration:none;
}

#sidebarOptions, #sidebarTabs {border-left: 1px solid #B2B6BE;}
#sidebarTabs {border-bottom: 1px solid #B2B6BE;}



#sidebar .tabUnselected, #sidebar .tabUnselected:hover {
color: #F0F3F5;
background: #B2B6BE ;
border: solid 1px #B2B6BE ;
padding-bottom:1px;
}

#sidebarTabs .tabContents {border:none; background:#DBDEE3; }

#sidebarTabs .tabContents {border-top:1px solid #B2B6BE;}

#sidebarTabs .tabContents .tabContents {border-left:1px solid #b2b6be;}









.viewer pre, .viewer code {
border: 1px solid #B2B6BE;
background: #EBEEF1;} 

#sidebarOptions .sliderPanel {
 background: #EBEEF1; border:none;
}

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

#sidebarOptions input:hover, #sidebarOptions input:active, #sidebarOptions input:focus {
 border: 1px inset #3371a3;
}

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

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

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

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

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

.tagged .highlight, .tagged .marked, .tagged a.button:active {text-decoration:underline; background:transparent; color:#014;}

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

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

.viewer blockquote {
 border-left:7px solid #ebeef1;
}

.viewer table {
 border: 1px solid #3371a3;
}

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

.viewer td, .viewer tr {
 border: 1px solid #3371a3;
}

.editor input, .editor textarea {
 border: 1px solid #1d65bc; background:#ebeef1;
}

.editor {padding-top:0.3em;}

.editor textarea:focus, .editor input:focus {
 border: 1px inset #3371a3; background:#fff;
}










.popup {
 background: #3371a3;
 border: 1px solid #333;
}

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

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

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

.popup li a:hover {
 background: #3371a3;
 color: #fff;
 border: none;
 text-decoration:underline;
}

.viewer .button:active, .viewer .marked, .viewer .highlight {
color: #fff !important;
background: #3371a3;
border: 0;
}

.button:active {background:#1d65bc; border:0;}

#sidebar .button:active, #sidebar .marked, #sidebar .highlight {color:#375669; background:transparent;text-decoration:none}

#messageArea {
 border: 2px dashed #3371a3;
 background: #dbdee3;
 color: #fff;
 font-size:90%;
}

#messageArea .button {
 color: #1d65bc;
 background: #ebeef1;
 text-decoration:none;
 font-weight:bold;
 border:none; 
}

#messageArea a.button {color:#1d65bc;}

#messageArea .button:hover {text-decoration:underline;}

.viewer .tabSelected, .viewer .tabSelected:hover{
 color: #375669;
 background: #eee;
 border-left: 1px solid #B2B6BE;
 border-top: 1px solid #B2B6BE;
 border-right: 1px solid #B2B6BE;
}

.viewer .tabUnselected, .viewer .tabUnselected:hover {
 color: #fff;
 background: #B2B6BE;
}

. viewer .tabContents {
 color: #375669;
 background: #ebeef1;
 border: 1px solid #B2B6BE;
}

.searchBar {float:right; font-size:0.9em;}
.searchBar .button {display:block; border:none; color:#ccc;}
.searchBar .button:hover{border:none; color:#eee;}

.searchBar input{
 border: 1px inset #1d65bc; background:#dbdee3;
}

.searchBar input:focus {
 border: 1px inset #3371a3; background:#fff;
}

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


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

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


#topMenu .fontResizer {float:right;}

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

#sidebarTabs .txtMoreTab .tiddlyLinkExisting {
 font-weight: bold;
 font-style: normal;
}
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/%
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|2.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|show/hide right sidebar (MainMenu)|

Usage: <<tiddler ToggleRightSidebar with: "label">>

Config settings:
	config.options.chkShowRightSidebar (true)
	config.options.txtToggleRightSideBarLabelShow (►)
	config.options.txtToggleRightSideBarLabelHide (◄)

%/<script label="$1" title="show/hide right sidebar content">
	var co=config.options;
	if (co.chkShowRightSidebar=='undefined') co.chkShowRightSidebar=true;
	co.chkShowRightSidebar=!co.chkShowRightSidebar;
	var sb=document.getElementById('sidebar'); if (!sb) return;
	sb.style.display=co.chkShowRightSidebar?'block':'none';
	document.getElementById('displayArea').style.marginRight=co.chkShowRightSidebar?'':'1em';
	saveOptionCookie('chkShowRightSidebar');
	var labelShow=co.txtToggleRightSideBarLabelShow||(config.browser.isSafari?'&#x25c0;':'&#x25c4;');
	var labelHide=co.txtToggleRightSideBarLabelHide||'&#x25ba;';
	if (typeof(place)!='undefined' && '$1'=='$'+'1') {
		place.innerHTML=co.chkShowRightSidebar?labelHide:labelShow;
		place.title=(co.chkShowRightSidebar?'hide':'show')+' right sidebar';
	}
	var sm=document.getElementById('storyMenu'); if (sm) config.refreshers.content(sm);
</script><script>
	var co=config.options;
	if (co.chkShowRightSidebar=='undefined') co.chkShowRightSidebar=true;
	var sb=document.getElementById('sidebar'); if (!sb) return;
	sb.style.display=co.chkShowRightSidebar?'block':'none';
	document.getElementById('displayArea').style.marginRight=co.chkShowRightSidebar?'':'1em';
	if ('$1'=='$'+'1') {
		var labelShow=co.txtToggleRightSideBarLabelShow||(config.browser.isSafari?'&#x25c0;':'&#x25c4;');
		var labelHide=co.txtToggleRightSideBarLabelHide||'&#x25ba;';
		place.lastChild.innerHTML=co.chkShowRightSidebar?labelHide:labelShow;
		place.lastChild.title=(co.chkShowRightSidebar?'hide':'show')+' right sidebar';
	}
</script>
We will head south of Madrid to Spain's former capital at Toledo. This city is a historical gem, a collage of 20 centuries of Roman, Arab, Christian and Jewish culture and history. Dating back to Roman rule in the 2nd century B.C., historians are even now unearthing the ruins of a Roman circus near the city. See classical, medieval Christian , Jewish and Arab architecture as you wind through a labyrinthine of 2000 years of history. Shop for historical curiosities in a wonderful variety of styles. Take in the view of the ancient city, sitting on a hill above a sharp bend in the Tagus River below, which inspired the great Spanish painter El Greco's famous landscape. Toledo is a city with an almost surreal historical richness where time seems to stand still while you walk back into past ages. 
[img[http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/images/Toledo_cath_puerto_principal.jpg]]
|~ViewToolbar|closeTiddler closeOthers +editHtml editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
<html><p><strong><span>Translation School at the University of Salamanca / Facultad de Traducci&oacute;n y Servicio Central de Idiomas de la Universidad de Salamanca</span></strong></p><span>       </span><p><!--[if !vml]--><span>         </span><img width="288" vspace="6" hspace="6" height="216" align="left" src="http://www.wfu.edu/romancelanguages/study_abroad/SummerInternship/academic_program_clip_image009.gif" alt="Salamanca building" v:shapes="_x0000_s1031" /><span>         </span><!--[endif]--><span>         </span><span lang="EN-GB" style=""><span>Among its various functions, the SCI (Servicio Central de Idiomas/Central Service for Foreign Languages) translates all types of documents for the university community, such as scientific papers, academic dossiers, legal documentation, press releases, etc. Internships are supervised and evaluated by the English Translation Coordinator at the SCI. A complement to this internship involves the participation in various translation projects in direct coordination with the <a href="javascript:;" title="The tiddler 'Vice-Dean' doesn't yet exist" class="tiddlyLink tiddlyLinkNonExisting" refresh="link" tiddlylink="Vice-Dean">Vice-Dean</a> of the </span><st1:place w:st="on"><st1:placename w:st="on"><span>Translation</span></st1:placename><span> </span><st1:placetype w:st="on"><span>School</span></st1:placetype></st1:place><span>. The SCI offers a maximum of two internships per each summer session.</span></span></p></html>
Always when you buy train tickets (billetes) make reservations (reservas) in advance to avoid problems (a few days is sufficient, except for Spring Break, for which you should allow at least a couple weeks). You can also make your plans ahead of time by going to www.renfe.es, which has schedules and connections for trains all over the country. A Carnet Joven can be obtained for about $3 in the youth section of the office building located in Plaza de la Constitución near the post office on Gran Vía. With this card you can receive up to a 20% discount on train fares over a certain mileage within Spain. The train station is in the northeast section of town. Credit cards accepted.

The bus station is located in the northwest part of town. Several different lines come through here, including the AutoRes line to Madrid (2.5 hours on the express). The bus is also a more efficient way to travel throughout Spain, but the Salamanca station will not have those schedules. Use www.auto-res.es, www.dainco.es for the south of Spain, and explore the Internet to find more schedules. For long trips, take the train.

Salamanca has a municipal bus system that can carry you to more distant areas of the city, including the Centro Comercial Tormes (Salamanca's mall) across the river. You can buy tickets right on the bus. Ask in the Oficina de Turismo about finding routes and schedules.

In any major city, take advantage of the Metro subway system if there is one. Madrid and Barcelona have speedy, safe and relatively clean metros, and your guide book will generally tell you which stop the sight you want to see connects to. Passes are usually sold individually or in packs often, and one pass is good for one ride, no matter how long your commute. Keep in mind, however, that the metro does not run all night, so if you go out you will have to get a cab.

If you do take a cab anywhere, the rate is reasonable, but insist that the driver use the meter so that you don't get ripped off. A good strategy is to approach a driver and ask how much it will be approximately to take you to a certain location; this way he can't take you for a ride around the city. If his estimate sounds high, ask someone else. A trip between the Barajas airport and the Madrid AutoRes station will be about 20€ or a little more; be aware that there are extra fees for luggage and going out of the city. Taxi drivers are also good people to ask if you are lost or are trying to find something.

To those wishing to venture to nearby countries there are many little travel agencies around town. The group favorite was Halcón right across from Don Quijote near class. They are open until 8 PM and were always very helpful. A travel agency can help you book flights or find a package tour to different destinations. However, most students agree that it is best to steer clear of the package deals unless you are going someplace dangerous, like North Africa. A tour may sound convenient, but you have to follow a schedule - getting up early in the morning and not having the luxury of deciding how much time you want to spend in a place. Even traveling in a country where you don't speak the language - Portugal, France, or Italy - you should be able to make your way without too much difficulty.

A Eurail pass/Europass must be purchased in the U.S. It is best for longer trips within Spain and to other countries. The best pass for our travel interests was the Eurail Youth Flexipass, which is good for either 10 (~$420) or 15 (~$580) days of travel within 2 months (still more economical than buying individual tickets for these trips). You could buy 2 passes with fewer days each rather than one with more days if you want to use Eurail throughout the semester (4 months overall). It is not really worth using up Eurail days for shorter trips within Spain. You can always have your parents send your pass once you get to Spain and discuss travel plans with friends, so that you get the ticket that will best suit you. Eurail passes are available through American Express Travel Services or Council Travel (you must have an International Student ID Card (ISIC), available through Wake's International Studies Office, to order through Council). Study carefully the rules in your Eurail guidebook about entering dates on your pass so that you don't cheat yourself out of travel days. European train conductors can be strict about this. Even a with a Eurail pass, you often need a seat reservation for a small fee at the RENFE office. Couchette (sleeping car) reservations are a bit more expensive than regular seats, but well worth it for overnight trips. Keep your Eurail pass on your person AT ALL TIMES.

Travel - in a group or on your own

Every year the group goes to a different series of sites. See your travel calendar. Enjoy the nice accommodations and having everything arranged for you on the group trips, but don't hesitate to take advantage of the three day weekends and travel on your own. Spain is too beautiful and diverse not to be fully explored - grab your guidebook and go! Check your guidebook or start with the following suggestions:

Alicante: Nicer beaches than Valencia and easy to go to on a weekend.

Ávila and Segovia: You'll probably tour both of these picturesque towns in one day. The Alcázar de Segovia is remarkable; if you want to climb up on the walls surrounding Ávila, go earlier in the day, because everything closes fairly early.

Barcelona: Visit the Barrio Gótico, Parque Guell, the Picasso Museum, the Olympic Park / Monjuic area, and of course, the magnificent Sagrada Famila Cathedral. Don't bother with the Pueblo Español. Take the overnight train from Salamanca if you go on your own.

Bilbao: The Guggenheim Museum is here and definitely worth the trip, although the rest of the city leaves something to be desired. Take the train from Santander.

Burgos: This town features El Cid's fortress, a wonderful cathedral, and an exchange student or two from Wake Forest. Stay overnight if you can - the marcha is very different from Salamanca's and offers a nice change.

Cádiz: Renowned for its Carneval celebration, it is a beautiful beach city with a wonderful historic district, a castle surrounded by the ocean, and amazing beaches.

Canary Islands: Travel agencies sometimes offer cheap flights, but they fill up fast and are at inconvenient times. Plan far ahead and remember that you will have to
leave from Madrid, so you may end up missing class. Unless you are willing to spend the money to go to one of the less touristy islands or the full party scene of the bigger cities, the cheap package deals are not really worth it. The cheapest, most popular places on Tenerife are full of British and German families and the beaches are not good at all. If your desire is to lie on a beach (and remember, you can do that in North Carolina), you may be better off going to the mainland coast, where at least you will have more mobility.

Ciudad Rodrigo: A tiny town near Salamanca with a fairly important Carneval celebration that includes a corrida de toros (bullfight).

Córdoba: The mosque is truly amazing, the Alcázar and its gardens are gorgeous, and you will enjoy wandering through typical narrow Andalusian streets and looking into people's patios. A nice, relaxing little town.

La Coruña: Don't overlook this little town on your way to Santiago. It makes a good first stop - it's a quiet place with inspiring rock cliffs and a lighthouse with a seemingly endless winding staircase.

Fuengirola: A very touristy beach town, Fuengirola is best used as a jumping-off point for a trip to Málaga, Marbella (another touristy beach town) or Gibraltar.

Gibraltar: Take a tour on the free day at the end of your trip south. It does take a couple of hours to get there by bus, but the park on the rock really is beautiful.
It's a nice break from speaking Spanish, and you can explore siege tunnels and play with monkeys. It goes without saying, but take your passport. You can't get
into Gibraltar without it. Gibraltar is under the sovereignty Great Britain .

Granada: Home of the Alhambra (which, despite the crowds of tourists, is not to be missed - if you are not going as a group be sure to call ahead, since it's usually impossible to buy same-day tickets), the Arab quarter, and rose garden dedicated to Federico García Lorca.

León: A lovely, relaxing town on the Camino de Santiago with the most beautiful cathedral in Spain.

Madrid: Go with the group, and then go on your own. It would take several trips to really get a feel for this exciting city. Don't miss the Plaza Mayor, Parque Buen Retiro, and the Reina Sofia (a museum of mostly twentieth-century art which houses Picasso's Guernica). The Prado merits more than one visit. One of Madrid's main features is the nightlife; don't wear sneakers or jeans when going out at night - many places in Madrid have dress codes.

Málaga: The beginning of the Costa del Sol, but it is still a fun town with beautiful beaches.

Mérida: Mérida was once a center of Roman activity on the Peninsula. The ruins are extremely interesting and it is an amazing, fun small town to explore.

Nerja: A quaint little town with caves and tropical scenery. Very cheap.

Pamplona: Small, quiet mountain town with lots of parks. Pamplona's festival of San Fermín is the most famous running of the bulls in Spain, try to run the uphill path
through narrow, winding streets yourself and you'll see why. Some Hemingway sites, including the bar he drank in, are closed in the winter.

Ronda: A good stop on the Ruta de los Pueblos Blancos, the famous white washed villages of Andalucia. It is only a couple of hours from Málaga and gives you a completely different perspective on Andalucian life.

San Sebastian: A beautiful city in País Vasco with windy beaches and breathtaking scenery. You may want to take two days so you can relax and enjoy the beach and the public park overlooking the ocean. At the top of the cliff in the park, you'll see an absolutely enormous statue of Jesus. San Sebastian also has excellent food - try the many different varieties of pinchos (another word for tapas).

Santander: Often rainy like San Sebastián, Santander has nice beaches and great seafood. Take a bus from San Sebastián, and stay in a hostel close to the beach.

Santiago de Compostela: See the cathedral, famous as the final resting place of St. James. The city is often filled with pilgrims, and the church services feature an
immense swinging incense burner.

Sevilla: It's likely you'll go during Semana Santa ( Holy Week) and have the opportunity to join in the madness surrounding the religious procesiones (parades). Remember to visit the cathedral and its famous tower, La Giralda, the Alcázar, and the Plaza de España. For your own trips, take the high-speed AVE train from Madrid.

Toledo: Full of El Greco and gross commercialism. The remnants of the days of Christian, Moor, and Jewish convivencia, such as the synagogue Santa María la Blanca and Sinagoga del Tránsito, are interesting. Toledo has the best tourist shops in Spain. And the best swords in the world!

Valencia: If you plan to go during Las Fallas (a festival / street riot that involves the building and burning of pavilions), make reservations as soon as you get to
Spain. The people who went from our group slept on the beach. Valencia has a busy nightlife scene and beaches; it's more fun with an impromptu group than alone. The Museo de Bellas Artes is nice, but not as impressive as some guidebooks would have you believe.

Travel close to Spain

Lisbon: Full of life and history, Lisbon is a beautiful city well worth a visit. Palm trees grow around the city - a most welcome change in the midst of a Salamanca winter. Take the 4:30 AM train. Go to the fortress, and go wandering through the old part of the city and tour the tower of Belém from the old port. The tile museum is also amazing. Lisbon is also close (30 mins) from Estoril, Cascais, and Sintra, all worth the time it takes to visit. If you don't have time for all three, see the castles at Sintra. Just be sure you buy your bus ticket for the ticket down from the mountain with the two castles before you go up. Cabs are easy to find going up, impossible to find going down. American movies in Portugal are subtitled, not dubbed.

Porto: Worth the train ride if you love port. Some wineries are not open on weekends, so plan carefully.

Morocco: Try to visit a city other than Tangiers. In the words of one former student, this city "makes Tiajuana look good." To really enjoy Morocco, go after the semester ends and take the time to do it right.

Farther outside Spain

Visit these places over Spring Break or when the semester ends. Trying to go somewhere like Paris or London for a weekend usually requires taking an extra day (or more) to justify the time and expense. Over Spring Break you will have the opportunity to see different part of western Europe, but don't do anything really ambitious - a trip to Amsterdam, Berlin, and Prague in one week, for example, will cause more pain and exhaustion than it's worth. A week is enough time to visit two major cities and one smaller town within the same country, while enjoying your travels. I recommend seeing Spain first - it's diverse, beautiful, and cheap with your Carnet Joven discount.

If you do want to do extensive traveling, and it is at all possible, stay after the semester and go then. This is also an excellent time for your parents to come visit you if they are planning on doing so - the weather is better, you'll have more time, fewer obligations, and won't have to cram places in. After days of travel, you'll want more than a few hours to spend in a city once you get there. If it's a matter of homesickness, and not finances, stay as long as possible. Once you get back to the States you'll wonder why you were in such a hurry to get here.

If you do plan to travel after the semester, check with your host family about leaving your luggage in the apartment while you're gone, as you will most likely fly out of
Madrid anyway. Plans will usually change once you get to Spain as to your plane ticket home. If you booked through Council Travel, the fee to change the ticket is
$25, but you should do it as soon as you possibly can - everyone studying abroad is trying to get home during the summer and June-July flights fill up fast!
Most importantly, always remember that you are on wonderful, exciting, once-in-a-lifetime adventure. Travel everywhere, see everything, meet everyone and have the best time of your life! 
Travel (see Transportation)
· If you plan on travelling outside of Spain before or after the end of the semester, a Eurorail pass is a good investment. But only if you are going to be traveling extensively outside Spain always by train.

Check out www.counciltravel.com for the different packages. You will need to buy this pass before you leave the U.S., or (less convenient) you will need to have someone in the U.S. buy it and send it to you.

Visas; procedures for getting visas for students participating in the Salamanca program.

    * [[Instructions for student visa for semester|http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/WFU%20Spain%20Visa%20Instructions%20SEMESTER.doc]]
    * [[Instructions for student visa for one year|http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/WFU%20Spain%20Visa%20Instructions%20YEAR.doc]]
    * [[Consulate information|http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/Consulate%20Information.xls]] 
Throughout the semester, students will travel together with the Wake Forest faculty director and/or with the on-site Director on a variety of excursions. Destinations may include: Madrid, El Escorial, Valle de los Caídos, Segovia, Toledo, Ávila, Sevilla, Córdoba, Granada and Barcelona or Santiago de Compostela. While visiting Sevilla, the capital of Andalucía, students will see the Arab Giralda, the Alcázar, and the Torre del Oro. In Barcelona, students will stroll down the beautiful avenue of Las Ramblas, detour into the city's medieval Gothic Quarter, and visit la Iglesia de la Sagrada Familia, Gaudí's masterpiece. In the city of Toledo, students will observe a collage of Roman, Arab, Christian, and Jewish culture and history. Designated the capital of Spain by Philip II in 1561, Madrid is one of Europe's most cosmopolitan cities. Students may visit the famous Prado museum, wander through Retiro park, and attend traditional and contemporary Spanish dance performances.

Here are some photos that Austin Jones (Fall 2008 student) took on the trips:
''http://wfusalamancafall2008.wordpress.com/''

''Madrid''
<<tiddler Madrid>>
----

''Segovia''
<<tiddler Segovia>>
----

''Toledo''
<<tiddler Toledo>>
----

''El Escorial''
<<tiddler "El Escorial">>
----

''Ávila''
<<tiddler Ávila>>
----

''Sevilla''
<<tiddler Sevilla>>
----

''Córdoba''
<<tiddler Córdoba>>
----

''Granada''
<<tiddler Granada>>
----

''Mérida''
<<tiddler Mérida>>
----

''Barcelona''
<<tiddler Barcelona>>
renamed FCKeditorPlugin
|>|!YourSearch Options|
|>|<<option chkUseYourSearch>> Use 'Your Search'|
|!|<<option chkPreviewText>> Show Text Preview|
|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required to start search)|
|!|Default Search Filter: <<option chkSearchInTitle>>Title ('!')     <<option chkSearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFields>>Extended Fields<html><br><font size="-2">The fields of a tiddlers that are searched when you don't explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|
|!|Number of items on search result page: <<option txtItemsPerPage>>|
|!|Number of items on search result page with preview text: <<option txtItemsPerPageWithPreview>>|
/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.1 (2007-03-11)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2006 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Community:''|[[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23YourSearchPlugin]]|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Revision history
* v2.1.1 (2007-03-11)
** Extend "New tiddler" feature: Ctrl-Return invokes the "new tiddler" feature (create tiddler based on search text)
** Extend "New tiddler" feature: tiddler's text and tags may also be specified (see abego.parseNewTiddlerCommandLine)
** Support searching for URLs (like http://www.example.com)
** Provided extended public API (abego.YourSearch.getFoundTiddlers/getQuery/onShowResult)
** Clear MessageBox when search field gets focus (so the box no longer hides the search field)
** Reset search result when TiddlyWiki is changed
** Fix function abego.BoolExp
* v2.1.0 (2006-10-12)
** Release version with TiddlyWiki 2.1 support
*** Support (Extended) Field search
*** Support parenthesis in Boolean Search
*** Support direct regular expression input
*** Support JavaScript Expressions for filtering
*** "new tiddler" feature (create tiddler based on search text)
* v2.0.2 (2006-02-13)
** Bugfix for Firefox 1.5.0.1 related to the "Show prefix" checkbox. Thanks to Ted Pavlic for reporting and to BramChen for fixing. 
** Internal
*** Make "JSLint" conform
* v2.0.1 (2006-02-05)
** Support "Exact Word Match" (use '=' to prefix word)
** Support default filter settings (when no filter flags are given in search term)
** Rework on the "less than 3 chars search text" feature (thanks to EricShulman)
** Better support SinglePageMode when doing "Open all tiddlers" (thanks to EricShulman)
** Support Firefox 1.5.0.1
** Bug: Fixed a hilite bug in "classic search mode" (thanks to EricShulman)
* v2.0.0 (2006-01-16)
** Add User Interface
* v1.0.1 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.0 (2005-12-28)
** initial version
!Source Code
***/
//{{{
//============================================================================
//============================================================================
//                           YourSearchPlugin
//============================================================================
//============================================================================

// Ensure that the Plugin is only installed once.
//
if (!version.extensions.YourSearchPlugin) {

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

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

// define the Array forEach when not yet defined (e.g. by Mozilla)
if (!Array.forEach) {
    Array.forEach = function(obj, callback, thisObj) {
        for (var i = 0,len = obj.length; i < len; i++)
            callback.call(thisObj, obj[i], i, obj);
    };
    Array.prototype.forEach = function(callback, thisObj) {
        for (var i = 0,len = this.length; i < len; i++)
            callback.call(thisObj,  this[i], i, this);
    };
}

abego.toInt = function(s, defaultValue) {
	if (!s) return defaultValue;
	var n = parseInt(s);
	return (n == NaN) ? defaultValue : n;
};

abego.createEllipsis = function(place) {
	var e = createTiddlyElement(place,"span");
	e.innerHTML = "&hellip;";
};

//#concept Object
//
abego.shallowCopy = function(object) {
	if (!object)
		return object;
	var result = {};
	for (var n in object) 
		result[n] = object[n];
	return result;
};

// Returns a shallow copy of the options, or a new, empty object if options is null/undefined.
//
// @param options [may be null/undefined]
//
//#concept Object, Options
//#import abego.shallowCopy
//
abego.copyOptions = function(options) {
	return !options ? {} : abego.shallowCopy(options);
};

//#import abego.define-namespace
// returns the number of occurances of s in the text
abego.countStrings = function(text, s) {
	if (!s)
		return 0;
		
	var len = s.length;
	var n = 0;
	var lastIndex = 0;
	while (1) {
		var i = text.indexOf(s, lastIndex);
		if (i < 0)
			return n;
		n++;
		lastIndex = i+len;
	}
	return n;
};// Returns the content of the first "braced" text {...}
// Also takes care of nested braces
//
// Returns undefined when no braced text is found or it is not properly nested
//
// @param [optional] when defined and a braced text is found lastIndexRef.lastIndex will contain the index of the char following the (final) closing brace on return.
//
abego.getBracedText = function(text, offset,lastIndexRef) {
	if (!offset) offset = 0;
	var re = /\{([^\}]*)\}/gm;
	re.lastIndex = offset;
	var m = re.exec(text);
	if (m) {
		// The matching stopped at the first closing brace.
		// But if the matched text contains opening braces 
		// this is not the final closing brace.
		// Handle this case specially, find the "corresponding" closing brace
		var s = m[1];
		var nExtraOpenBrace = abego.countStrings(s,"{");
		
		if (!nExtraOpenBrace) {
			if (lastIndexRef)
				lastIndexRef.lastIndex = re.lastIndex;
			// simple case: no nested braces
			return s;
		}

		// special case: "nested braces"
		var len = text.length;
		for (var i = re.lastIndex; i < len && nExtraOpenBrace; i++) {
			var c = text.charAt(i);
			if (c == "{") 
				nExtraOpenBrace++;
			else if (c == "}")
				nExtraOpenBrace--;
		}
		if (!nExtraOpenBrace) {
			// found the corresponding "}".
			if (lastIndexRef)
				lastIndexRef.lastIndex = i-1;
			return text.substring(m.index+1, i-1);
		}
	}
	
	// no return means: return undefined;
};

// Returns an array with those items from the array that pass the given test
//
// @param test an one-arg boolean function that returns true when the item should be added.
// @param testObj [optional] the receiver for the test function (global if undefined or null)
// @param result [optional] an array. When define the selected items are added to this array, otherwise a new array is used.
//
//#import Array.prototype.forEach
//
abego.select = function(array,test,testObj,result) {
	if (!result) result = [];
	array.forEach(function(t) {
		if (test.call(testObj,t)) 
			result.push(t);
		});
	return result;
};

// Class abego.TiddlerFilterTerm =================================================================
//
// Used to check if a tiddler contains a given text.
//
// A list of fields (standard and/or extended) may be specified to restrict the search to certain fields. 
//
// When no explicit fields are given the fields defined by defaultFields are checked, plus all extended 
// fields (when options.withExtendedFields is true).
//
// @param options [may be null/undefined]
//		options.fields @seeParam abego.MultiFieldRegExpTester.fields
// 		options.withExtendedFields @seeParam abego.MultiFieldRegExpTester.withExtendedFields  
// 		options.caseSensitive [Default: false]
// 		options.fullWordMatch [Default: false]
// 		options.textIsRegExp [Default: false] when true the given text is already a regExp
//
//#import abego.MultiFieldRegExpTester
//
abego.TiddlerFilterTerm = function(text,options) {
	if (!options) options = {};

	var reText = text;
	if (!options.textIsRegExp) {
		reText = text.escapeRegExp();
		if (options.fullWordMatch) 
			reText = "\\b"+reText+"\\b";
	}
	var regExp = new RegExp(reText, "m"+(options.caseSensitive ? "" : "i"));

	this.tester = new abego.MultiFieldRegExpTester(regExp, options.fields, options.withExtendedFields);
}

abego.TiddlerFilterTerm.prototype.test = function(tiddler) {
	return this.tester.test(tiddler);
}

// Recognize a string like
//     "Some Title. Some content text #Tag1 #Tag2 Tag3"
// with the tags and the text being optional.
// Also the period at the end of the title is optional when no content text is specified)
//
// Returns the result in an object with properties "title" and "params",
// with "params" following the parseParams format, containing the "tag" and "text" arguments.
//
abego.parseNewTiddlerCommandLine = function(s) {
	var m = /(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(s);
	if (!m) 
		m = /([^#]*)()(#.*)?/.exec(s);
	if (m) {
		var r;
		if (m[3]) {
			var s2 = m[3].replace(/#/g,"");
			r = s2.parseParams("tag");
		} else
			r = [[]];
			
		// add the text parameter
		var text = m[2]?m[2].trim():"";
		r.push({name: "text", value: text});
		r[0].text = [text];
		
		return {title: m[1].trim(), params: r}; 
	} else
		return {title: s.trim(),params: [[]]};
}	
// 		options.defaultFields [@seeOptionDefault abego.TiddlerFilterTerm.fields] fields to check when no fields are explicitly specified in queryText.
// 		options.withExtendedFields [@seeOptionDefault abego.TiddlerFilterTerm.withExtendedFields] when true and no fields are explicitly specified in queryText also the extended fields are considered (in addition to the ones in defaultFields).
// @seeOptions abego.TiddlerFilterTerm (-fields -fullWordMatch -withExtendedFields)
//
//#import abego.getBracedText
//#import abego.copyOptions
//#import abego.TiddlerFilterTerm
//
abego.parseTiddlerFilterTerm = function(queryText,offset,options) {
	
	// group 1: {...} 		(JavaScript expression)
	// group 2: '=' 		(full word match (optional))
	// group 3: [!%#] 		(field selection short cuts)
	// group 4: fieldName ':'
	// group 5: String literal "..."
	// group 6: RegExp literal /.../
	// group 7: scheme '://' nonSpaceChars
	// group 8: word
	var re = /\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;
	var shortCuts = {'!':'title','%':'text','#':'tags'};
	
	var fieldNames = {};
	var fullWordMatch;
	re.lastIndex = offset;
	while (1) {
		var i = re.lastIndex;
		var m = re.exec(queryText);
		if (!m || m.index != i) 
			throw "Word or String literal expected";
		if (m[1]) {
			var lastIndexRef = {};
			var code = abego.getBracedText(queryText,0,lastIndexRef);
			if (!code)
				throw "Invalid {...} syntax";
			var f = Function("tiddler","return ("+code+");");
			return {func: f,
					lastIndex:lastIndexRef.lastIndex,
					markRE: null};
		}
		if (m[2])
			fullWordMatch = true;
		else if (m[3]) 
			fieldNames[shortCuts[m[3]]] = 1;
		else if (m[4]) 
			fieldNames[m[4]] = 1;
		else {
			var textIsRegExp = m[6];
			var text = m[5] ? window.eval(m[5]) : m[6] ? m[6] :  m[7] ? m[7] : m[8];
			
			var options = abego.copyOptions(options);
			options.fullWordMatch = fullWordMatch;
			options.textIsRegExp = textIsRegExp;

			var fields = [];
			for (var n in fieldNames)
				fields.push(n);
			if (fields.length == 0) {
				options.fields = options.defaultFields;
			} else {
				options.fields = fields;
				options.withExtendedFields	= false;
			}	
			var term = new abego.TiddlerFilterTerm(text,options);
			var markREText = textIsRegExp ? text : text.escapeRegExp();
			if (markREText && fullWordMatch)
				markREText = "\\b"+markREText+"\\b";
			return {func: function(tiddler) {return term.test(tiddler);},
					lastIndex:re.lastIndex,
					markRE: markREText ? "(?:"+markREText+")" : null};
		}
	}
};

// Class abego.BoolExp =================================================================
//
// Allows the execution/evaluation of a boolean expression, according to this syntax:
//
// boolExpression    : unaryExpression (("AND"|"OR"|"&&"|"||")? unaryExpression)*
//                   ;
//
// unaryExpression   : ("not"|"-")? primaryExpression
//                   ;
//
// primaryExpression : "(" boolExpression ")" 
//                   | Term
//                   ;
//
// For flexibility the Term syntax is defined by a separate parse function.
//
// Notice that there is no precedence between "AND" and "OR" operators, i.e. they are evaluated from left to right.
//
// To evaluate the expression in a given context use code like this:
//
//	var be = new abego.BoolExp(s, termParseFunc);
//  var result = be.exec(context);
// 
// @param s the text defining the expression 
// @param parseTermFunc a Function(text,offset,options) that parses the text starting at offset for a "Term" and returns an object with properties {func: Function(context), lastIndex: ...}. func is the function to be used to evaluate the term in the given context.
// @param options [may be null/undefined] (is also passed to the parseTermFunc)
// 			options.defaultOperationIs_OR [Default: false] When true the concatenation of unaryExpressions (without an operator) is interpreted as an "OR", otherwise as an "AND".
// 			options.caseSensitive [default: false]
//
abego.BoolExp = function(s, parseTermFunc, options) {
	this.s = s;
	var defaultOperationIs_OR = options && options.defaultOperationIs_OR;
	
	var reStart = /\s*(?:(\-|not)|(\())/gi; 		// group 1: NOT, group2 "("
	var reCloseParenthesis = /\s*\)/g;  			// match )
	var reAndOr = /\s*(?:(and|\&\&)|(or|\|\|))/gi; 	// group 1: AND, group 2: OR
	var reNonWhiteSpace = /\s*[^\)\s]/g;
	
	var reNot_Parenthesis = /\s*(\-|not)?(\s*\()?/gi;
	
	var parseBoolExpression; //#Pre-declare function name to avoid problem with "shrinkSafe"
	
	var parseUnaryExpression = function(offset) {
		reNot_Parenthesis.lastIndex = offset;
		var m = reNot_Parenthesis.exec(s);
		var negate;
		var result;
		if (m && m.index == offset) {
			offset = reNot_Parenthesis.lastIndex;
			negate = m[1];
			if (m[2]) {
				// case:  (...)
				var e = parseBoolExpression(offset);
				reCloseParenthesis.lastIndex = e.lastIndex;
				if (!reCloseParenthesis.exec(s))
					throw "Missing ')'";
				result = {func: e.func, lastIndex: reCloseParenthesis.lastIndex, markRE: e.markRE};
			}
		}
		if (!result)
			result = parseTermFunc(s,offset,options);

		if (negate) {
			result.func = (function(f){return function(context) {return !f(context);}})(result.func);
			// don't mark patterns that are negated
			// (This is essential since the marking may also be used to calculate "ranks". If we
			// would also count the negated matches (i.e. that should not exist) the rank may get too high)
			result.markRE = null;
		}
		return result;
	};

	parseBoolExpression = function(offset) {
		var result = parseUnaryExpression(offset);
		while (1) {
			var l = result.lastIndex;
			reAndOr.lastIndex = l;
			var m = reAndOr.exec(s);
			var isOrCase;
			var nextExp;
			if (m && m.index == l) {
				isOrCase = !m[1];
				nextExp = parseUnaryExpression(reAndOr.lastIndex);
			} else {
				// no "AND" or "OR" found. 
				// Maybe it is a concatenations of parseUnaryExpression without operators
				try {
					nextExp = parseUnaryExpression(l);
				} catch (e) {
					// no unary expression follows. We are done
					return result;
				}
				isOrCase = defaultOperationIs_OR;
			}
			result.func = (function(func1, func2, isOrCase) {
					return isOrCase
						? function(context) {return func1(context) || func2(context);}
						: function(context) {return func1(context) && func2(context);};
				})(result.func,nextExp.func,isOrCase);
			result.lastIndex = nextExp.lastIndex;
			if (!result.markRE)
				result.markRE = nextExp.markRE;
			else if (nextExp.markRE) 
				result.markRE = result.markRE + "|" + nextExp.markRE;
		}
	};
	
	var expr = parseBoolExpression(0);
	this.evalFunc = expr.func;
	if (expr.markRE)
		this.markRegExp = new RegExp(expr.markRE, options.caseSensitive ? "mg" : "img");
}

abego.BoolExp.prototype.exec = function() {
	return this.evalFunc.apply(this,arguments);
};

abego.BoolExp.prototype.getMarkRegExp = function() {
	return this.markRegExp;
};

abego.BoolExp.prototype.toString = function() {
	return this.s;
};

// Class abego.MultiFieldRegExpTester ==================================================================
//
// @param fields [optional; Default: ["title","text","tags"]] array of names of fields to be considered
// @param withExtendedFields [optional; Default: false] when true also extended fields are considered (in addition to the ones given in 'fields')
//
abego.MultiFieldRegExpTester = function(re, fields, withExtendedFields) {
	this.re = re;
	this.fields = fields ? fields : ["title","text","tags"];
	this.withExtendedFields = withExtendedFields;
}

// Returns the name of the first field found that value succeeds the given test,
// or null when no such field is found
//
abego.MultiFieldRegExpTester.prototype.test = function(tiddler) {
	var re = this.re;
	// Check the fields explicitly specified
	for (var i = 0; i < this.fields.length; i++) {
		var s = store.getValue(tiddler, this.fields[i]);
		if (typeof s == "string" && re.test(s))
			return this.fields[i];		
	}
	// Check the extended fields (if required)
	if (this.withExtendedFields) 
		return store.forEachField(
				tiddler,
				function(tiddler, fieldName, value) {
					return typeof value == "string" && re.test(value)?fieldName:null;
				}, true);
		
	return null;
}

// Class abego.TiddlerQuery ==================================================================
//
//#import abego.select
//#import abego.MultiFieldRegExpTester
//
abego.TiddlerQuery = function(queryText,caseSensitive,useRegExp,defaultFields,withExtendedFields) {
	if (useRegExp) {
		this.regExp = new RegExp(queryText, caseSensitive ? "mg" : "img");
		this.tester = new abego.MultiFieldRegExpTester(this.regExp, defaultFields, withExtendedFields);
	} else {
		this.expr = new abego.BoolExp(
				queryText,
				abego.parseTiddlerFilterTerm, {
				defaultFields: defaultFields,
				caseSensitive: caseSensitive,
				withExtendedFields: withExtendedFields});
	}
	
	this.getQueryText = function() {
		return queryText;
	};
	this.getUseRegExp = function() {
		return useRegExp;
	};
	this.getCaseSensitive = function() {
		return caseSensitive;
	};
	this.getDefaultFields = function() {
		return defaultFields;
	};
	this.getWithExtendedFields = function() {
		return withExtendedFields;
	};
}

// Returns true iff the query includes the given tiddler
//
// @param tiddler [may be null/undefined]
//
abego.TiddlerQuery.prototype.test = function(tiddler) {
	if (!tiddler) return false;
	if (this.regExp) {
		return this.tester.test(tiddler);
	}
	return this.expr.exec(tiddler);
};

// Returns an array with those tiddlers from the tiddlers array that match the query.
//
abego.TiddlerQuery.prototype.filter = function(tiddlers) {
	return abego.select(tiddlers,this.test,this);
};

abego.TiddlerQuery.prototype.getMarkRegExp = function() {
	if (this.regExp) {
		// Only use the regExp for marking when it does not match the empty string.
		return "".search(this.regExp) >= 0 ? null :  this.regExp;
	}
	return this.expr.getMarkRegExp();
};

abego.TiddlerQuery.prototype.toString = function() {
	return (this.regExp ? this.regExp : this.expr).toString();
};

// Class abego.PageWiseRenderer ================================================
//
// Subclass or instance must implement getItemsPerPage function;
// They should also implement onPageChanged and refresh the container of the
// PageWiseRenderer on that event.
//
//#import abego.toInt
//
abego.PageWiseRenderer = function() {
	this.firstIndexOnPage = 0; // The index of the first item of the lastResults list displayed on the search result page
};

merge(abego.PageWiseRenderer.prototype, {
	setItems: function(items) {
		this.items = items;
		this.setFirstIndexOnPage(0);
	},
	
	// Maximum number of pages listed in the navigation bar (before or after the current page)
	//
	getMaxPagesInNavigation: function() {
		return 10;
	},
	
	getItemsCount: function(items) {
		return this.items ? this.items.length : 0;
	},
	
	getCurrentPageIndex: function() {
		return Math.floor(this.firstIndexOnPage / this.getItemsPerPage());
	},
	
	getLastPageIndex: function() {
		return Math.floor((this.getItemsCount()-1) / this.getItemsPerPage())
	},
	
	setFirstIndexOnPage: function(index) {
		this.firstIndexOnPage = Math.min(Math.max(0, index), this.getItemsCount()-1);
	},
	
	getFirstIndexOnPage: function() {
		// Ensure that the firstIndexOnPage is really a page start. 
		// This may have become violated when getItemsPerPage has changed,
		// (e.g. when switching between previewText and simple mode.)
		this.firstIndexOnPage = Math.floor(this.firstIndexOnPage / this.getItemsPerPage()) * this.getItemsPerPage();
	
		return this.firstIndexOnPage;
	},
	
	getLastIndexOnPage: function() {
		return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1, this.getItemsCount()-1);
	},
	
	onPageChanged: function(pageIndex,oldPageIndex) {
	},
	
	renderPage: function(itemRenderer) {
		if (itemRenderer.beginRendering)
			itemRenderer.beginRendering(this);
		try {
			// When there are items found add them to the result page (pagewise)
			if (this.getItemsCount()) {
				// Add the items of the current page
				var lastIndex = this.getLastIndexOnPage();
				var iInPage = -1;
				for (var i=this.getFirstIndexOnPage(); i <= lastIndex; i++) {
					iInPage++;
					
					itemRenderer.render(this,this.items[i],i,iInPage);
				}
			}
		} finally {
			if (itemRenderer.endRendering)
				itemRenderer.endRendering(this);
		}
	},
	
	addPageNavigation: function(place) {
		if (!this.getItemsCount()) return;
	
		var self = this;
		var onNaviButtonClick = function(e) {
			if (!e) var e = window.event;
		
			var pageIndex = abego.toInt(this.getAttribute("page"),0);
			var oldPageIndex = self.getCurrentPageIndex();
			if (pageIndex == oldPageIndex)
				return;
			var index = pageIndex * self.getItemsPerPage();
			self.setFirstIndexOnPage(index);
			self.onPageChanged(pageIndex,oldPageIndex);	
		};
	
		var button;
		var currentPageIndex = this.getCurrentPageIndex();
		var lastPageIndex = this.getLastPageIndex();
		if (currentPageIndex > 0) {
			button = createTiddlyButton(place, "Previous", "Go to previous page (Shortcut: Alt-'<')", onNaviButtonClick, "prev");
			button.setAttribute("page",(currentPageIndex-1).toString());
			button.setAttribute("accessKey","<");
		}
	
		for (var i = -this.getMaxPagesInNavigation(); i < this.getMaxPagesInNavigation(); i++) {
			var pageIndex = currentPageIndex+i;
			if (pageIndex < 0) continue;
			if (pageIndex > lastPageIndex) break;
	
			var pageNo = (i+currentPageIndex+1).toString();
			var buttonClass = pageIndex == currentPageIndex ? "currentPage" : "otherPage";
			button = createTiddlyButton(place, pageNo, "Go to page %0".format([pageNo]), onNaviButtonClick, buttonClass);
			button.setAttribute("page",(pageIndex).toString());
		}
		
		if (currentPageIndex < lastPageIndex) {
			button = createTiddlyButton(place, "Next", "Go to next page (Shortcut: Alt-'>')", onNaviButtonClick, "next");
			button.setAttribute("page",(currentPageIndex+1).toString());
			button.setAttribute("accessKey",">");
		}
	}
});

// Class abego.LimitedTextRenderer ===========================================================
//
// Renders a given text, ensuring that a given limit of number of characters 
// is not exceeded.
//
// A "markRegExp" may be specified. Substring matching this regular expression 
// ("matched strings") are rendered with the class "marked". 
//
// if the given text is longer than the limit the matched strings are preferred 
// to be included in the rendered text (with some leading and trailing "context text"). 
// 
// Example:
//     var renderer = new abego.LimitedTextRenderer();
//
//     var place = ... // a DOM element that should contain the rendered (limited) text
//     var s = "This is another 'Hello World' example, as saying 'Hello' is always nice. So let's say it again: >Hello!<";
//     var maxLen = 50;
//     var markRE = /hello/gi;
//     renderer.render(place,s,maxLen,markRE);
// 
//#import abego.createEllipsis
//
abego.LimitedTextRenderer = function() {
	var minMatchWithContextSize = 40; 
	var maxMovementForWordCorrection = 4; // When a "match" context starts or end on a word the context borders may be changed to at most this amount to include or exclude the word.
	
	
	//----------------------------------------------------------------------------
	//
	// Ranges
	//
	// Objects with a "start" and "end" property (not a specific class). 
	// 
	// In a corresponding "Ranges array" these objects are sorted by their start 
	// and no Range object intersects/touches any other in the array.
	//
	//----------------------------------------------------------------------------
	
	// Adds the Range [startIndex,endIndex[ to the ranges, ensuring that the Ranges
	// in the array are sorted by their start and no Range object 
	// intersects/touches any other in the array (i.e. possibly the new Range is 
	// "merged" with existing ranges)
	//
	// @param ranges array of Range objects
	//
	var addRange = function(ranges, startIndex, endIndex) {
		var n = ranges.length;
		
		// When there are no ranges in ranges, just add it.
		if (n == 0) {
			ranges.push({start: startIndex, end: endIndex});
			return;
		}
		
		var i = 0;
		for (; i < n; i++) {
			var range = ranges[i];
			
			// find the first range that intersects or "touches" [startIndex, endIndex[
			if (range.start <= endIndex && startIndex <= range.end) {
				// Found.
				
				var r;
				// find the first range behind the new range that does not interfere
				var rIndex = i+1;
				for (; rIndex < n; rIndex++) {
					r = ranges[rIndex];
					if (r.start > endIndex || startIndex > range.end) {
						break;
					}
				}
				
				// Replace the ranges i to rIndex-1 with the union of the new range with these ranges.
				var unionStart = startIndex;
				var unionEnd = endIndex;
				for (var j = i; j < rIndex; j++) {
					r = ranges[j];
					unionStart = Math.min(unionStart, r.start);
					unionEnd = Math.max(unionEnd, r.end);
				}
				ranges.splice(i, rIndex-i, {start: unionStart, end: unionEnd});
				return;			
			}
			
			// if we found a range R that is right of the new range there is no
			// intersection and we can insert the new range before R.
			if (range.start > endIndex) {
				break;
			}
		}
	
		// When we are here the new range does not interfere with any range in ranges and
		// i is the index of the first range right to it (or ranges.length, when the new range
		// becomes the right most range). 
	
		ranges.splice(i, 0, {start: startIndex, end: endIndex});
	};
	
	// Returns the total size of all Ranges in ranges
	//
	var getTotalRangesSize = function(ranges) {
		var totalRangeSize = 0;
		for (var i=0; i < ranges.length; i++) {
			var range = ranges[i];
			totalRangeSize += range.end-range.start;
		}
		return totalRangeSize;
	};
	
	//----------------------------------------------------------------------------
	
	
	var isWordChar = function(c) {
		return (c >= "a" && c <= "z") || (c >= "A" && c <= "Z") || c == "_";
	};
	
	// Returns the bounds of the word in s around offset as a {start: , end:} object.
	//
	// Returns null when the char at offset is not a word char.
	//
	var getWordBounds = function(s, offset) {
		// Handle the "offset is not in word" case
		if (!isWordChar(s[offset])) return null;
	
		for (var i = offset-1; i >= 0 && isWordChar(s[i]); i--) 
			{/*empty*/}
			
		var startIndex = i+1;
		var n = s.length;
		for (i = offset+1; i < n && isWordChar(s[i]); i++) 
			{/*empty*/}
		
		return {start: startIndex, end: i};
	};
	
	var moveToWordBorder = function(s, offset, isStartOffset) {
		var wordBounds;
		if (isStartOffset) {
			wordBounds = getWordBounds(s, offset);
		} else {
			if (offset <= 0) return offset;
			wordBounds = getWordBounds(s, offset-1);
		}
		if (!wordBounds) return offset;
		
		if (isStartOffset) {
			if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
			if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
		} else {
			if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
			if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
		}
		return offset;
	};
	
	
	
	// Splits s into a sequence of "matched" and "unmatched" substrings, using the 
	// matchRegExp to do the matching.
	// 
	// Returns an array of objects with a "text" property containing the substring text. 
	// Substrings that are "matches" also contain a boolean "isMatch" property set to true.
	// 
	// @param matchRegExp [may be null] when null no matching is performed and the returned 
	// 			array just contains one item with s as its text
	// 
	var getTextAndMatchArray = function(s, matchRegExp) {
		var result = [];
		if (matchRegExp) {
			var startIndex = 0;
			var n = s.length;
			var currentLen = 0;
			do {
				matchRegExp.lastIndex = startIndex;
				var match = matchRegExp.exec(s);
				if (match) {
					if (startIndex < match.index) {
						var t = s.substring(startIndex, match.index);
						result.push({text:t});
					}
					result.push({text:match[0], isMatch:true});
					startIndex = match.index + match[0].length;
				} else {
					result.push({text: s.substr(startIndex)});
					break;
				}
			} while (true);
		} else {
			result.push({text: s});
		}
		return result;
	};
	
	
	
	var getMatchedTextCount = function(textAndMatches) {
		var result = 0;
		for (var i=0; i < textAndMatches.length; i++) {
			if (textAndMatches[i].isMatch) {
				result++;
			}
		}
		return result;	
	};
	
	
	
	var getContextRangeAround = function(s, startIndex, endIndex, matchCount, maxLen) {
		// Partition the available space into equal sized areas for each match and one 
		// for the text start.
		// But the size should not go below a certain limit
		var size = Math.max(Math.floor(maxLen/(matchCount+1)), minMatchWithContextSize);
		
		// Substract the size of the range to get the size of the context.
		var contextSize = Math.max(size-(endIndex-startIndex), 0);
		// Two thirds of the context should be before the match, one third after.
		var contextEnd = Math.min(Math.floor(endIndex+contextSize/3), s.length);
		var contextStart = Math.max(contextEnd - size, 0);
	
		// If the contextStart/End is inside a word and the end of the word is
		// close move the pointers accordingly to make the text more readable.
		contextStart = moveToWordBorder(s, contextStart, true);
		contextEnd = moveToWordBorder(s, contextEnd, false);
		
		return {start: contextStart, end: contextEnd};
	};
	
	// Get all ranges around matched substrings with their contexts
	//
	var getMatchedTextWithContextRanges = function(textAndMatches, s, maxLen) {
		var ranges = [];
		var matchCount = getMatchedTextCount(textAndMatches);
		var pos = 0;
		for (var i=0; i < textAndMatches.length; i++) {
			var t = textAndMatches[i];
			var text = t.text;
			if (t.isMatch) {
				var range = getContextRangeAround(s, pos, pos+text.length, matchCount, maxLen);
				addRange(ranges, range.start, range.end);
			}
			pos += text.length;
		}
		return ranges;
	};
	
	var fillUpRanges = function(s, ranges, maxLen) {
		var remainingLen = maxLen - getTotalRangesSize(ranges);
		while (remainingLen > 0) {
			if (ranges.length == 0) {
				// No matches added yet. Make one large range.
				addRange(ranges, 0, moveToWordBorder(s, maxLen, false));
				return;
			} else {
				var range = ranges[0];
				var startIndex;
				var maxEndIndex;
				if (range.start == 0) {
					// The first range already starts at the beginning of the string.
	
					// When there is a second range fill to the next range start or to the maxLen.
					startIndex = range.end;
					if (ranges.length > 1) {
						maxEndIndex =  ranges[1].start;
					} else {
						// Only one range. Add a range after that with the complete remaining len 
						// (corrected to "beautify" the output)
						addRange(ranges, startIndex, moveToWordBorder(s, startIndex+remainingLen, false));
						return;
					}
				} else {
					// There is unused space between the start of the text and the first range.
					startIndex = 0;
					maxEndIndex = range.start;
				}
				var endIndex = Math.min(maxEndIndex, startIndex+remainingLen);
				addRange(ranges, startIndex, endIndex);
				remainingLen -= (endIndex-startIndex);
			}
		}
	};
	
	
	// Write the given ranges of s, using textAndMatches for marking portions of the text.
	//
	var writeRanges = function(place, s, textAndMatches, ranges, maxLen) {
		if (ranges.length == 0) return;
		
		// Processes the text between startIndex and endIndex of the textAndMatches
		// "writes" them (as DOM elements) at the given place, possibly as "marked" text.
		//
		// When endIndex is not the end of the full text an ellisis is appended. 
		//
		var writeTextAndMatchRange = function(place, s, textAndMatches, startIndex, endIndex) {
			var t;
			var text;
			
			// find the first text item to write
			var pos = 0;
			var i = 0;
			var offset = 0;
			for (;i < textAndMatches.length; i++) {
				t = textAndMatches[i];
				text = t.text;
				if (startIndex < pos+text.length) {
					offset = startIndex - pos;
					break;
				}
				pos += text.length;
			}
			
			var remainingLen = endIndex - startIndex;
			for (; i < textAndMatches.length && remainingLen > 0; i++) {
				t = textAndMatches[i];
				text = t.text.substr(offset);
				offset = 0;
				if (text.length > remainingLen) text = text.substr(0,remainingLen);
				
				if (t.isMatch) {
					createTiddlyElement(place,"span",null,"marked",text);
				} else {
					createTiddlyText(place, text);
				}
				remainingLen -= text.length;
			}
			
			if (endIndex < s.length) {
				abego.createEllipsis(place);
			}
		};
		
		// When the first range is not at the start of the text write an ellipsis("...")
		// (Ellipses between ranges are written in the writeTextAndMatchRange method)
		if (ranges[0].start > 0) abego.createEllipsis(place);
	
		var remainingLen = maxLen;
		for (var i = 0; i < ranges.length && remainingLen > 0; i++) {
			var range = ranges[i];
			var len = Math.min(range.end - range.start, remainingLen);
			writeTextAndMatchRange(place, s, textAndMatches, range.start, range.start+len);
			remainingLen -= len;
		}
	};
	
	this.render = function(place,s,maxLen,markRegExp) {
		if (s.length < maxLen) maxLen = s.length;
		
		var textAndMatches = getTextAndMatchArray(s, markRegExp);
		
		var ranges = getMatchedTextWithContextRanges(textAndMatches, s, maxLen);
		
		// When the maxLen is not yet reached add more ranges 
		// starting from the beginning until either maxLen or 
		// the end of the string is reached.
		fillUpRanges(s, ranges, maxLen);
	
		writeRanges(place, s, textAndMatches, ranges, maxLen);
	};
};



(function() {

function alertAndThrow(msg) {
	alert(msg);
	throw msg;
};

if (version.major < 2 || (version.major == 2 && version.minor < 1)) 
	alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive");

abego.YourSearch = {};

//----------------------------------------------------------------------------
// The Search Core
//----------------------------------------------------------------------------

// Model Variables
var lastResults; // Array of tiddlers that matched the last search
var lastQuery; // The last Search query (TiddlerQuery)

var setLastResults = function(array) {
	lastResults = array;
};

var getLastResults = function() {
	return lastResults ? lastResults : [];
};

var getLastResultsCount = function() {
	return lastResults ? lastResults.length : 0;
};

// Standard Ranking Weights
var matchInTitleWeight = 4;
var precisionInTitleWeight = 10;
var matchInTagsWeight = 2;

var getMatchCount = function(s, re) {
	var m = s.match(re);
	return m ? m.length : 0;
};

var standardRankFunction = function(tiddler, query) {	
	// Count the matches in the title and the tags
	var markRE = query.getMarkRegExp();
	if (!markRE) return 1;
	
	var matchesInTitle = tiddler.title.match(markRE);
	var nMatchesInTitle =  matchesInTitle ? matchesInTitle.length : 0;
	var nMatchesInTags = getMatchCount(tiddler.getTags(), markRE);

	// Calculate the "precision" of the matches in the title as the ratio of
	// the length of the matches to the total length of the title.
	var lengthOfMatchesInTitle = matchesInTitle ? matchesInTitle.join("").length : 0;
	var precisionInTitle = tiddler.title.length > 0 ? lengthOfMatchesInTitle/tiddler.title.length : 0;
	
	// calculate a weighted score
	var rank= nMatchesInTitle * matchInTitleWeight 
			+ nMatchesInTags * matchInTagsWeight 
			+ precisionInTitle * precisionInTitleWeight 
			+ 1;

	return rank;
};

// @return Tiddler[]
//
var findMatches = function(store, searchText,caseSensitive,useRegExp,sortField,excludeTag) {
	lastQuery = null;
	
	var candidates = store.reverseLookup("tags",excludeTag,false);
	try {
		var defaultFields = [];
		if (config.options.chkSearchInTitle) defaultFields.push("title");
		if (config.options.chkSearchInText) defaultFields.push("text");
		if (config.options.chkSearchInTags) defaultFields.push("tags");
		lastQuery = new abego.TiddlerQuery(
				searchText,caseSensitive, useRegExp,defaultFields,config.options.chkSearchExtendedFields); 
	} catch (e) {
		// when an invalid query is given no tiddlers are matched
		return [];
	}

	var results = lastQuery.filter(candidates);

	// Rank the results
	var rankFunction = abego.YourSearch.getRankFunction();
	for (var i = 0; i < results.length; i++) {
		var tiddler = results[i];
		var rank = rankFunction(tiddler, lastQuery);
		// Add the rank information to the tiddler.
		// This is used during the sorting, but it may also
		// be used in the result, e.g. to display some "relevance" 
		// information in the result	
		tiddler.searchRank = rank;	
	}
	
	// sort the result, taking care of the rank and the sortField	
	if(!sortField) {
		sortField = "title";
	}
	
	var sortFunction = function (a,b) {
		var searchRankDiff = a.searchRank - b.searchRank;
		if (searchRankDiff == 0) {
			if (a[sortField] == b[sortField]) {
				return(0); 
			} else {
				return (a[sortField] < b[sortField]) ? -1 : +1; 
			}
		} else {
			return (searchRankDiff > 0) ? -1 : +1; 
		}
	};
	results.sort(sortFunction);
	return results;
};

//----------------------------------------------------------------------------
// The Search UI (Result page)
//----------------------------------------------------------------------------


// Visual appearance of the result page
var maxCharsInTitle = 80;
var maxCharsInTags = 50;
var maxCharsInText = 250;
var maxCharsInField = 50;

var itemsPerPageDefault = 25; // Default maximum number of items on one search result page
var itemsPerPageWithPreviewDefault = 10; // Default maximum number of items on one search result page when PreviewText is on

// DOM IDs
var yourSearchResultID = "yourSearchResult";
var yourSearchResultItemsID = "yourSearchResultItems";

var lastSearchText; // The last search text, as passed to findMatches

var resultElement; // The (popup) DOM element containing the search result [may be null]
var searchInputField; // The "search" input field
var searchButton; // The "search" button
var lastNewTiddlerButton;

var initStylesheet = function() {
	if (version.extensions.YourSearchPlugin.styleSheetInited) 
		return;
		
	version.extensions.YourSearchPlugin.styleSheetInited = true;
	setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch");
}

var isResultOpen = function() {
	return resultElement != null && resultElement.parentNode == document.body;
};

var closeResult = function() {
	if (isResultOpen()) {
		document.body.removeChild(resultElement);
	}
};

// Closes the Search Result window and displays the tiddler 
// defined by the "tiddlyLink" attribute of this element
//
var closeResultAndDisplayTiddler = function(e)
{
	closeResult();
	
	var title = this.getAttribute("tiddlyLink");
	if(title) {
		var withHilite = this.getAttribute("withHilite");
		var oldHighlightHack = highlightHack;
		if (withHilite && withHilite=="true" && lastQuery) {
			highlightHack = lastQuery.getMarkRegExp();
		}
		story.displayTiddler(this,title);
		highlightHack = oldHighlightHack;
	}
	return(false);
};

// Adjusts the resultElement's size and position, relative to the search input field.
//
var adjustResultPositionAndSize = function() {
	if (!searchInputField) return;
	
	var root = searchInputField;
	
	// Position the result below the root and resize it if necessary.
	var rootLeft = findPosX(root);
	var rootTop = findPosY(root);


	var rootHeight = root.offsetHeight;
	var popupLeft = rootLeft;
	var popupTop = rootTop + rootHeight;

	// Make sure the result is not wider than the window
	var winWidth = findWindowWidth();
	if (winWidth < resultElement.offsetWidth) {
		resultElement.style.width = (winWidth - 100)+"px";
		winWidth = findWindowWidth();
	}

	// Ensure that the left and right of the result are not
	// clipped by the window. Move it to the left or right, if necessary.	
	var popupWidth = resultElement.offsetWidth;
	if(popupLeft + popupWidth > winWidth)
		popupLeft = winWidth - popupWidth-30;
	if (popupLeft < 0) popupLeft = 0;
	
	// Do the actual moving
	resultElement.style.left = popupLeft + "px";
	resultElement.style.top = popupTop + "px";
	resultElement.style.display = "block";
};

var scrollVisible = function() {
	// Scroll the window to make the result page (and the search Input field) visible.
	if (resultElement) window.scrollTo(0,ensureVisible(resultElement));
	if (searchInputField) window.scrollTo(0,ensureVisible(searchInputField));
};

// Makes sure the result page has a good size and position and visible
// (may scroll the window)
//
var	ensureResultIsDisplayedNicely = function() {
	adjustResultPositionAndSize();
	scrollVisible();
};



var indexInPage; // The index (in the current page) of the tiddler currently rendered.
var currentTiddler; // While rendering the page the tiddler that is currently rendered.

var pager = new abego.PageWiseRenderer();

var MyItemRenderer = function(parent) {
	// Load the template how to display the items that represent a found tiddler
	this.itemHtml = store.getTiddlerText("YourSearchItemTemplate");
	if (!this.itemHtml) alertAndThrow("YourSearchItemTemplate not found");
	
	// Locate the node that shall contain the list of found tiddlers
	this.place = document.getElementById(yourSearchResultItemsID);
	if(!this.place)
		this.place = createTiddlyElement(parent,"div",yourSearchResultItemsID);
};

merge(MyItemRenderer.prototype,{
	render: function(pager,object,index,indexOnPage) {
		// Define global variables, referenced by macros during applyHtmlMacros
		indexInPage = indexOnPage;
		currentTiddler = object;
		
		var item = createTiddlyElement(this.place,"div",null, "yourSearchItem");
		item.innerHTML = this.itemHtml;
		applyHtmlMacros(item,null);
		refreshElements(item,null);
	},

	endRendering: function(pager) {
		// The currentTiddler must only be defined while rendering the found tiddlers
		currentTiddler = null;
	}
});

// Refreshes the content of the result with the current search result
// of the selected page.
//
// Assumes that the result is already open. 
//
var refreshResult = function() {
	if (!resultElement || !searchInputField) return;

	// Load the template for the YourSearchResult
	var html = store.getTiddlerText("YourSearchResultTemplate");
	if (!html) html = "<b>Tiddler YourSearchResultTemplate not found</b>";
	resultElement.innerHTML = html;

	// Expand the template macros etc.
	applyHtmlMacros(resultElement,null);
	refreshElements(resultElement,null);
	
	var itemRenderer = new MyItemRenderer(resultElement);
	pager.renderPage(itemRenderer);

	ensureResultIsDisplayedNicely();
};

pager.getItemsPerPage = function() {
	var n = (config.options.chkPreviewText) 
			? abego.toInt(config.options.txtItemsPerPageWithPreview, itemsPerPageWithPreviewDefault) 
			: abego.toInt(config.options.txtItemsPerPage, itemsPerPageDefault);
	return (n > 0) ? n : 1;
};

pager.onPageChanged = function() {
	refreshResult();
};

var	reopenResultIfApplicable = function() {
	if (searchInputField == null || !config.options.chkUseYourSearch) return;
	
	if ((searchInputField.value == lastSearchText) && lastSearchText && !isResultOpen()) {
		// For speedup we check re-use the previously created resultElement, if possible.
		if (resultElement && (resultElement.parentNode != document.body)) {
			document.body.appendChild(resultElement);
			ensureResultIsDisplayedNicely();
		} else {
			abego.YourSearch.onShowResult(true);
		}
	}
};


var invalidateResult = function() {
	closeResult();
	resultElement = null;
	lastSearchText = null;
};



//-------------------------------------------------------------------------
// Close the search result page when the user clicks on the document
// (and not into the searchInputField, on the search button or in the result)
// or presses the ESC key

// Returns true if e is either self or a descendant (child, grandchild,...) of self.
//
// @param self DOM:Element
// @param e DOM:Element or null
//
var isDescendantOrSelf = function(self, e) {
	while (e != null) {
		if (self == e) return true;
		e = e.parentNode;
	}
	return false;
};

var onDocumentClick = function(e) {
	if (e.target == searchInputField) return; 
	if (e.target == searchButton) return; 
	if (resultElement && isDescendantOrSelf(resultElement, e.target)) return; 
	
	closeResult();
};

var onDocumentKeyup = function(e) {
	// Close the search result page when the user presses "ESC"
	if (e.keyCode == 27) closeResult();
};
addEvent(document,"click",onDocumentClick);
addEvent(document,"keyup",onDocumentKeyup);


// Our Search Macro Hijack Function ==========================================

// Helper
var myStorySearch = function(text,useCaseSensitive,useRegExp)
{
	lastSearchText = text;
	setLastResults(findMatches(store, text,useCaseSensitive,useRegExp,"title","excludeSearch"));

	abego.YourSearch.onShowResult();
};


var myMacroSearchHandler = function(place,macroName,params,wikifier,paramString,tiddler)
{
	initStylesheet();

	lastSearchText = "";
	var searchTimeout = null;
	var doSearch = function(txt)
		{
		if (config.options.chkUseYourSearch)
			myStorySearch(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
		else
			story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
		lastSearchText = txt.value;
		};
	var clickHandler = function(e)
		{
		doSearch(searchInputField);
		return false;
		};
	var keyHandler = function(e)
		{
		if (!e) var e = window.event;
		searchInputField = this;
		switch(e.keyCode)
			{
			case 13:
				if (e.ctrlKey && lastNewTiddlerButton && isResultOpen())
					lastNewTiddlerButton.onclick.apply(lastNewTiddlerButton,[e]);
				else
					doSearch(this);
				break;
			case 27:
				// When the result is open, close it, 
				// otherwise clear the content of the input field
				if (isResultOpen()) {
					closeResult();
				} else {
					this.value = "";
					clearMessage();
				}
				break;
			}
		if (String.fromCharCode(e.keyCode) == this.accessKey || e.altKey) 
			{
			reopenResultIfApplicable();
			}

		if(this.value.length<3 && searchTimeout) clearTimeout(searchTimeout);
		if(this.value.length > 2)
			{
		 	if (this.value != lastSearchText)
		 		{
				if (!config.options.chkUseYourSearch || config.options.chkSearchAsYouType)
					{
					if(searchTimeout)
						clearTimeout(searchTimeout);
					var txt = this;
					searchTimeout = setTimeout(function() {doSearch(txt);},500);
					}
				}
			else
				{
				if(searchTimeout)
					clearTimeout(searchTimeout);
				}
			};
		if (this.value.length == 0) 
			{
			closeResult();
			}
		};


	var focusHandler = function(e)
		{
		this.select();
		clearMessage();
		reopenResultIfApplicable();
		};

	
	var args = paramString.parseParams("list",null,true);
	var buttonAtRight = getFlag(args, "buttonAtRight");
	var sizeTextbox = getParam(args, "sizeTextbox", this.sizeTextbox);
	
	var btn;
	if (!buttonAtRight)
		btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);
		
	var txt = createTiddlyElement(place,"input",null,null,null);
	if(params[0])
		txt.value = params[0];
	txt.onkeyup = keyHandler;
	txt.onfocus = focusHandler;
	txt.setAttribute("size",sizeTextbox);
	txt.setAttribute("accessKey",this.accessKey);
	txt.setAttribute("autocomplete","off");
	if(config.browser.isSafari)
		{
		txt.setAttribute("type","search");
		txt.setAttribute("results","5");
		}
	else
		txt.setAttribute("type","text");

	if (buttonAtRight)
		btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);

	searchInputField = txt;
	searchButton = btn;
};

//----------------------------------------------------------------------------
// Support for Macros
//----------------------------------------------------------------------------

var openAllFoundTiddlers = function() {
	closeResult();
	var results = getLastResults();
	var n = results.length;
	if (n) {
		var titles=[];
		for(var i = 0; i<n; i++)
			titles.push(results[i].title);
		story.displayTiddlers(null,titles);
	}
};

var createOptionWithRefresh = function(place, optionParams, wikifier,tiddler) {
	invokeMacro(place,"option",optionParams,wikifier,tiddler);
	// The option macro appended the component at the end of the place.
	var elem = place.lastChild;
	var oldOnClick = elem.onclick;
	elem.onclick = function(e) {
		var result = oldOnClick.apply(this, arguments);
		refreshResult();
		return result;
	};
	return elem;
};

var removeTextDecoration = function(s) {
	var removeThis = ["''", "{{{", "}}}", "//", "<<<", "/***", "***/"];
	var reText = "";
	for (var i = 0; i < removeThis.length; i++) {
		if (i != 0) reText += "|";
		reText += "("+removeThis[i].escapeRegExp()+")";
	}
	return s.replace(new RegExp(reText, "mg"), "").trim();
};



// Returns the "shortcut number" of the currentTiddler. 
// I.e. When the user presses Alt-n the given tiddler is opened/display.
//
// @return 0-9 or -1 when no number is defined
//
var getShortCutNumber = function() {
	var i = indexInPage;
	return (i >= 0 && i <= 9) 
		? (i < 9 ? (i+1) : 0)
		: -1;
};

var limitedTextRenderer = new abego.LimitedTextRenderer();
var renderLimitedText = function(place, s, maxLen) {
	limitedTextRenderer.render(place,s,maxLen,lastQuery.getMarkRegExp())
}

// When any tiddler are changed reset the result.
// 
var oldTiddlyWikiSaveTiddler = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields) {
	oldTiddlyWikiSaveTiddler.apply(this, arguments);
	invalidateResult();
};
var oldTiddlyWikiRemoveTiddler = TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler = function(title) {
	oldTiddlyWikiRemoveTiddler.apply(this, arguments);
	invalidateResult();
};

//----------------------------------------------------------------------------
// Macros
//----------------------------------------------------------------------------

// ====Macro yourSearch ================================================

config.macros.yourSearch = {
	// Standard Properties
	label: "yourSearch",
	prompt: "Gives access to the current/last YourSearch result",
	
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		if (params.length == 0) return;
	
		var name = params[0];
		var func = config.macros.yourSearch.funcs[name];
		if (func) func(place,macroName,params,wikifier,paramString,tiddler);
	},
	
	tests: {
		"true" : function() {return true;},
		"false" : function() {return false;},
		"found" : function() {return getLastResultsCount() > 0;},
		"previewText" : function() {return config.options.chkPreviewText;}
	},

	funcs: {
		itemRange: function(place) {
			if (getLastResultsCount()) {
				var lastIndex = pager.getLastIndexOnPage();
				var s = "%0 - %1".format([pager.getFirstIndexOnPage()+1,lastIndex+1]);
				createTiddlyText(place, s);
			}
		},
		
		count: function(place) {
			createTiddlyText(place, getLastResultsCount().toString());
		},
		
		query: function(place) {
			if (lastQuery) {
				createTiddlyText(place, lastQuery.toString());
			}
		},
		
		version: function(place) {
			var t = "YourSearch %0.%1.%2".format(
					[version.extensions.YourSearchPlugin.major, 
					 version.extensions.YourSearchPlugin.minor, 
					 version.extensions.YourSearchPlugin.revision]);
			var e = createTiddlyElement(place, "a");
			e.setAttribute("href", "http://tiddlywiki.abego-software.de/#YourSearchPlugin");
			e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">'+t+'<font>';
		},
		
		copyright: function(place) {
			var e = createTiddlyElement(place, "a");
			e.setAttribute("href", "http://www.abego-software.de");
			e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">&copy; 2005-2006 <b><font color="red">abego</font></b> Software<font>';
		},
		
		newTiddlerButton: function(place) {
			if (lastQuery) {
				var r = abego.parseNewTiddlerCommandLine(lastQuery.getQueryText());
				var btn = config.macros.newTiddler.createNewTiddlerButton(place,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");				
				// Close the result before the new tiddler is created.
				var oldOnClick = btn.onclick;
				btn.onclick = function() {
					closeResult();
					oldOnClick.apply(this,arguments);
				}
				lastNewTiddlerButton = btn;
			}
		},
		
		linkButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (params < 2) return;
			
			var	tiddlyLink = params[1];
			var text = params < 3 ? tiddlyLink : params[2];
			var tooltip = params < 4 ? text : params[3];
			var accessKey = params < 5 ? null : params[4];
			
			var btn = createTiddlyButton(place,text,tooltip,closeResultAndDisplayTiddler,null,null, accessKey);
			btn.setAttribute("tiddlyLink",tiddlyLink);
		},
		
		closeButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			var button = createTiddlyButton(place, "close", "Close the Search Results (Shortcut: ESC)", closeResult);
		},
		
		openAllButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			var n = getLastResultsCount();
			if (n == 0) return;
		
			var title = n == 1 ? "open tiddler" : "open all %0 tiddlers".format([n]);
			var button = createTiddlyButton(place, title, "Open all found tiddlers (Shortcut: Alt-O)", openAllFoundTiddlers);
			button.setAttribute("accessKey","O");
		},
		
		naviBar: function(place,macroName,params,wikifier,paramString,tiddler) {
			pager.addPageNavigation(place);
		},
		
		"if": function(place,macroName,params,wikifier,paramString,tiddler) {
			if (params.length < 2) return;
			
			var testName = params[1];
			var negate = (testName == "not");
			if (negate) {
				if (params.length < 3) return;
				testName = params[2];
			}
			
			var test = config.macros.yourSearch.tests[testName];
			var showIt = false;
			try {
				if (test) {
					showIt = test(place,macroName,params,wikifier,paramString,tiddler) != negate;
				} else {
					// When no predefined test is specified try to evaluate it as a JavaScript expression.
					showIt = (!eval(testName)) == negate;
				}
			} catch (ex) {
			}
			
			if (!showIt) {
				place.style.display="none";
			}
		},
		
		chkPreviewText: function(place,macroName,params,wikifier,paramString,tiddler) {
			var optionParams = params.slice(1).join(" ");
			
			var elem = createOptionWithRefresh(place, "chkPreviewText", wikifier,tiddler);
			elem.setAttribute("accessKey", "P");
			elem.title = "Show text preview of found tiddlers (Shortcut: Alt-P)";	
			return elem;
		}
	}
};


// ====Macro foundTiddler ================================================

config.macros.foundTiddler = {
	// Standard Properties
	label: "foundTiddler",
	prompt: "Provides information on the tiddler currently processed on the YourSearch result page",
	
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var name = params[0];
		var func = config.macros.foundTiddler.funcs[name];
		if (func) func(place,macroName,params,wikifier,paramString,tiddler);
	},
		
	funcs: {
		title: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
			
			var shortcutNumber = getShortCutNumber();
			var tooltip = shortcutNumber >= 0 
					? "Open tiddler (Shortcut: Alt-%0)".format([shortcutNumber.toString()])
					: "Open tiddler";
		
			var btn = createTiddlyButton(place,null,tooltip,closeResultAndDisplayTiddler,null);
			btn.setAttribute("tiddlyLink",currentTiddler.title);
			btn.setAttribute("withHilite","true");
			
			renderLimitedText(btn, currentTiddler.title, maxCharsInTitle);
		
			if (shortcutNumber >= 0) {
				btn.setAttribute("accessKey",shortcutNumber.toString());
			}
		},
		
		tags: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
		
			renderLimitedText(place, currentTiddler.getTags(), maxCharsInTags);
		},
		
		text: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
		
			renderLimitedText(place, removeTextDecoration(currentTiddler.text), maxCharsInText);
		},
		
		field:  function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
			var	name = params[1];
			var len = params.length > 2 ? abego.toInt(params[2],maxCharsInField) : maxCharsInField;
			var v = store.getValue(currentTiddler,name);
			if (v)
				renderLimitedText(place, removeTextDecoration(v), len);
		},
		
		// Renders the "shortcut number" of the current tiddler, to indicate to the user
		// what number to "Alt-press" to open the tiddler.
		//
		number: function(place,macroName,params,wikifier,paramString,tiddler) {
			var numberToDisplay = getShortCutNumber();
			if (numberToDisplay >= 0) {
				var text = "%0)".format([numberToDisplay.toString()]);
				createTiddlyElement(place,"span",null,"shortcutNumber",text);
			}
		}
	}
};


//----------------------------------------------------------------------------
// Configuration Stuff
//----------------------------------------------------------------------------

var opts = {chkUseYourSearch:true,
	chkPreviewText:true,
	chkSearchAsYouType:true,
	chkSearchInTitle:true,
	chkSearchInText:true,
	chkSearchInTags:true,
	chkSearchExtendedFields:true,
	txtItemsPerPage:itemsPerPageDefault,
	txtItemsPerPageWithPreview:itemsPerPageWithPreviewDefault};
for (var n in opts) 
	if (config.options[n] == undefined) config.options[n] = opts[n];




//----------------------------------------------------------------------------
// Shadow Tiddlers
//----------------------------------------------------------------------------

config.shadowTiddlers.AdvancedOptions += "\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";

config.shadowTiddlers["YourSearch Help"] =
"!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g"+
" only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e."+
"g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard field"+
"s {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles "+
"only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text "+
"only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only"+
"''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may"+
" also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1"+
"}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one"+
" field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containin"+
"g \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boole"+
"an Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you "+
"type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}}"+
")|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must "+
"not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two"+
" words, separated with a space, YourSearch finds all tiddlers that contain both words, but not neces"+
"sarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need"+
" to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change "+
"the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds"+
" all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}"+
"} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"j"+
"eremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched tex"+
"t. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~Complet"+
"edTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you"+
" need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Tas"+
"k', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch"+
"\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearc"+
"h. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you m"+
"ay do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly enterin"+
"g the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/"+
"}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript E"+
"xpression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki interna"+
"ls you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression"+
" into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and e"+
"valuate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tidd"+
"ler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Com"+
"bined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Res"+
"ult|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its tit"+
"les, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact wor"+
"d). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encour"+
"aged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. F"+
"or quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|"+
"!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search in"+
"put field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the pr"+
"evious search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. S"+
"elect tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Resul"+
"t]] is already closed and the cursor is in the search input field the field's content is cleared so "+
"you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second e"+
"tc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the "+
"'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[Your"+
"Search Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the "+
"{{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of t"+
"hese shortcuts don't work for you check your browser if you have other extensions installed that alr"+
"eady \"use\" these shortcuts.//";

config.shadowTiddlers["YourSearch Options"] =
"|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText"+
">> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required"+
" to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chk"+
"SearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFiel"+
"ds>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don"+
"'t explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!"+
"', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items "+
"on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with pre"+
"view text: <<option txtItemsPerPageWithPreview>>|\n";
			
config.shadowTiddlers["YourSearchStyleSheet"] = 
"/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800"+
"px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGra"+
"y;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width:"+
" thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSea"+
"rchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary ."+
"button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summa"+
"ry .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*"+
"/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-to"+
"p: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearc"+
"hText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFoote"+
"r {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;"+
"\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/"+
"\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: bla"+
"ck;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSe"+
"archNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #"+
"FF0000;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold"+
";\n\tcolor: blue;\n}\n/*}}}*/\n";

config.shadowTiddlers["YourSearchResultTemplate"] =
"<!--\n{{{\n-->\n<span macro=\"yourSearch if found\">\n<!-- The Summary Header ============================"+
"================ -->\n<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"+
"<tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearc"+
"h itemRange\"></span>\n\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+
"\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n\t</td>\n\t<td class=\"yourSea"+
"rchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel"+
"\">preview text</span>\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch openAllButton\"></span>\n\t\t<span macro=\"yourSearch lin"+
"kButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkB"+
"utton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch clo"+
"seButton\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ================="+
"=========================== -->\n<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPr"+
"eview=\"10\"></div>\n\n<!-- The Footer (with the Navigation) ==========================================="+
"= -->\n<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody"+
">\n  <tr>\n\t<td align=\"left\">\n\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar"+
"\"></span>\n\t</td>\n\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearc"+
"h copyright\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the 'tiddlers found' case ========="+
"================================== -->\n</span>\n\n\n<!-- The \"No tiddlers found\" case ================="+
"========================== -->\n<span macro=\"yourSearch if not found\">\n<table class=\"summary\" border="+
"\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Resu"+
"lt: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n\t</td>\n\t<t"+
"d class=\"yourSearchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Options'"+
" options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help"+
" 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch closeButton\"></span>\n\t</td>\n  <"+
"/tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n";

config.shadowTiddlers["YourSearchItemTemplate"] = 
"<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSea"+
"rchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='found"+
"Tiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='fo"+
"undTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";

config.shadowTiddlers["YourSearch"] = "<<tiddler [[YourSearch Help]]>>";

config.shadowTiddlers["YourSearch Result"] = "The popup-like window displaying the result of a YourSearch query.";

//----------------------------------------------------------------------------
// Install YourSearch
//----------------------------------------------------------------------------

// Overwrite the TiddlyWiki search handler and verify after a while 
// that nobody else has overwritten it.
config.macros.search.handler = myMacroSearchHandler;

var checkForOtherHijacker = function() {
	// Check that still our search handler is installed
    if (config.macros.search.handler != myMacroSearchHandler) {
    	alert(
"Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may "+
"disable the other plugin or change the load order of \nthe plugins (by changing the names of the tidd"+
"lers)\nto enable the 'Your Search' features.");
    }
};

setTimeout(checkForOtherHijacker, 5000);

// === Public API =================================

abego.YourSearch.getStandardRankFunction = function() {
	return standardRankFunction;
};

abego.YourSearch.getRankFunction = function() {
	return abego.YourSearch.getStandardRankFunction();
};

abego.YourSearch.getCurrentTiddler = function() {
	return currentTiddler;
};

abego.YourSearch.closeResult = function() {
	closeResult();
};

// Returns an array of tiddlers that matched the last search
abego.YourSearch.getFoundTiddlers = function() {
	return lastResults;
};

// The last Search query (TiddlerQuery), or null
abego.YourSearch.getQuery = function() {
	return lastQuery;
};

abego.YourSearch.onShowResult = function(useOldResult) {
	highlightHack = lastQuery ? lastQuery.getMarkRegExp() : null;
	if (!useOldResult)
		pager.setItems(getLastResults());
	if (!resultElement) {
		resultElement = createTiddlyElement(document.body,"div",yourSearchResultID,"yourSearchResult");
	} else if (resultElement.parentNode != document.body) {
		document.body.appendChild(resultElement);
	}
	refreshResult();
	highlightHack = null;
};

})();
} // of "install only once"
// Used Globals (for JSLint) ==============

// ... JavaScript Core
/*global 	alert,clearTimeout,confirm */
// ... TiddlyWiki Core
/*global 	Tiddler, applyHtmlMacros, clearMessage, createTiddlyElement, createTiddlyButton, createTiddlyText, ensureVisible ,findPosX, highlightHack, findPosY,findWindowWidth, invokeMacro, saveChanges, refreshElements, story */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005-2006 ([[www.abego-software.de|http://www.abego-software.de]])

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

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

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

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

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

/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.0.2 (2006-02-13)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''TiddlyWiki:''|2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
<<tiddler [[YourSearch Introduction]]>>
For more information see [[Help|YourSearch Help]].

!Compatibility
This plugin requires TiddlyWiki 2.0. 
Use http://tiddlywiki.abego-software.de/#YourSearchPlugin-1.0.1 for older TiddlyWiki versions.

!Revision history
* v2.0.2 (2006-02-13)
** Bugfix for Firefox 1.5.0.1 related to the "Show prefix" checkbox. Thanks to Ted Pavlic for reporting and to BramChen for fixing. 
** Internal
*** Make "JSLint" conform
* v2.0.1 (2006-02-05)
** Support "Exact Word Match" (use '=' to prefix word)
** Support default filter settings (when no filter flags are given in search term)
** Rework on the "less than 3 chars search text" feature (thanks to EricShulman)
** Better support SinglePageMode when doing "Open all tiddlers" (thanks to EricShulman)
** Support Firefox 1.5.0.1
** Bug: Fixed a hilite bug in "classic search mode" (thanks to EricShulman)
* v2.0.0 (2006-01-16)
** Add User Interface
* v1.0.1 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.0 (2005-12-28)
** initial version
/%
***/
//{{{
//============================================================================
//============================================================================
// YourSearchPlugin
//============================================================================
//============================================================================

// Ensure that the Plugin is only installed once.
//
if (!version.extensions.YourSearchPlugin) {

version.extensions.YourSearchPlugin = {
 major: 2, minor: 0, revision: 2,
 date: new Date(2006, 2, 13), 
 type: 'plugin',
 source: "http://tiddlywiki.abego-software.de/#YourSearchPlugin"
};

var alertAndThrow = function(msg) {alert(msg);throw msg;};

if (!window.abego) window.abego = {};
if (abego.YourSearch) alertAndThrow("abego.YourSearch already defined");
abego.YourSearch = {};

if (version.major < 2) alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.0 or newer.\n\nGet YourSearch 1.0.1 to use YourSearch with older versions of TiddlyWiki.\n\nhttp://tiddlywiki.abego-software.de/#YourSearchPlugin-1.0.1");

//----------------------------------------------------------------------------
// The STQ (SimpleTiddlerQuery) Class
//----------------------------------------------------------------------------

// Internal.
// 
var STQ = function(queryText, caseSensitive, matchTitleOnly, useRegExp) {
 this.queryText = queryText;
 this.caseSensitive = caseSensitive;

 if (useRegExp) {
 this.regExp = new RegExp(queryText, caseSensitive ? "mg" : "img");
 return;
 }
 
 this.terms = [];

 // The regular expression that matches a single search term of the form
 // (whitespace handling and grouping omitted for clarity):
 //
 // -?[#!%]*(<doubleQuoteStringLiteral>|<wordWithoutSpace>) (AND|OR)?
 //
 // group 1: '-' (negate, optional)
 // group 2: [!%#]* (may be empty)
 // group 3: String literal "..."
 // group 4: word
 // group 5: AND / OR (optional) 
 //
 // (group 3 xor group 4 is defined)
 //
 var re = /\s*(\-)?([#%!=]*)(?:(?:("(?:(?:\\")|[^"])*")|(\S+)))(?:\s+((?:[aA][nN][dD])|(?:[oO][rR]))(?!\S))?/mg;

 var matches = re.exec(queryText);

 while (matches != null && matches.length == 6) {
 var negate = '-' == matches[1];
 var flags = matches[2];
 var inTitle = flags.indexOf('!') >= 0;
 var inText = flags.indexOf('%') >= 0;
 var inTag = flags.indexOf('#') >= 0;
 var wordMatch = flags.indexOf('=') >= 0;
 if (!inTitle && !inText && !inTag) {
 inTitle = config.options.chkSearchInTitle;
 inText = config.options.chkSearchInText;
 inTag = config.options.chkSearchInTags;
 
 // If all settings are off (i.e. all results would be empty, 
 // i.e user error or checkboxes are gone) set all settings
 if (!inTitle && !inText && !inTag) {
 inTitle = inText = inTag = true;
 }
 }
 if (matchTitleOnly) {
 inText = false;
 inTag = false;
 }
 
 var text;
 if (matches[3]) {
 //Quoted String
 try {
 text = eval(matches[3]);
 } catch (ex) {
 // ignore error. Will be handled right after this.
 }
 } else {
 text = matches[4];
 }
 if (!text) {
 throw "Invalid search expression: %0".format([queryText]);
 }
 var orFollows = matches[5] && matches[5].charAt(0).toLowerCase() == 'o';
 this.terms.push(new STQ.Term(text, inTitle, inText, inTag, negate, orFollows, caseSensitive, wordMatch));
 
 matches = re.exec(queryText);
 }
};

var me = STQ.prototype;

// Internal.
// 
// Returns an array with those tiddlers from the tiddlersMap that 
// match the query.
//
me.getMatchingTiddlers = function(tiddlersMap) {
 var result = [];
 for (var i in tiddlersMap) {
 var t = tiddlersMap[i];
 if ((t instanceof Tiddler) && this.matchesTiddler(t)) {
 result.push(t);
 }
 }
 return result;
};


// Internal.
// 
// Returns true if the query has a match in the given tiddler.
//
// @param tiddler [may be null]
//
me.matchesTiddler = function(tiddler) {
 if (this.regExp) {
 return this.regExp.test(tiddler.title) || this.regExp.test(tiddler.text);
 }
 
 var n = this.terms.length;
 if (n == 0) {
 return false;
 }
 
 var hasMatch = this.terms[0].matchesTiddler(tiddler);
 for (var i = 1; i < this.terms.length; i++) {
 if (this.terms[i-1].orFollows) {
 // the OR case.
 
 // shortcut: when the first operand of an OR is true 
 // we don't need to evaluate the second operand since 
 // the result of the OR will always be true.
 
 // In the other case we actually to the "OR"
 if (!hasMatch) {
 hasMatch |= this.terms[i].matchesTiddler(tiddler);
 }
 } else {
 // the AND case.
 
 // shortcut: when the first operand of an AND is false 
 // we don't need to evaluate the second operand since
 // the result of the AND will always be false.
 
 // Otherwise we actually to the "AND"
 if (hasMatch) {
 hasMatch &= this.terms[i].matchesTiddler(tiddler);
 }
 }
 }
 return hasMatch;
};

// Internal.
// 
me.getOnlyMatchTitleQuery = function() {
 if (!this.onlyMatchTitleQuery) {
 this.onlyMatchTitleQuery = new STQ(this.queryText, this.caseSensitive, true, this.useRegExp);
 }
 return this.onlyMatchTitleQuery;
};


// Returns a regular expression that can be used to marking/hiliting
// matches in the text.
//
// @return [may be null] null when the query does not provide marking information.
//
me.getMarkRegExp = function() {
 if (this.regExp) {
 // Only use the regExp for marking when it does not match the empty string.
 return "".search(this.regExp) >= 0 ? null : this.regExp;
 }
 
 var stringSet = {};
 var n = this.terms.length;
 for (var i = 0; i < this.terms.length; i++) {
 var term = this.terms[i];
 if (!term.negate) stringSet[term.text] = true;
 }

 var pattern = [];
 for (var t in stringSet) pattern.push("(" + t.escapeRegExp() + ")");
 
 if (pattern.length == 0) return null;

 var joinedPattern = pattern.join("|");
 return new RegExp(joinedPattern, this.caseSensitive ? "mg" : "img");
};

// Internal.
// 
me.toString = function() {
 if (this.regExp) {
 return this.regExp.toString();
 }
 
 var result = "";
 for (var i = 0; i < this.terms.length; i++) {
 result += this.terms[i].toString();
 }
 return result;
};

//----------------------------------------------------------------------------
// The STQ.Term Class
//----------------------------------------------------------------------------

// Internal.
//
STQ.Term = function(text, inTitle, inText, inTag, negate, orFollows, caseSensitive, wordMatch) {
 this.text = text;
 this.inTitle = inTitle;
 this.inText = inText;
 this.inTag = inTag;
 this.negate = negate;
 this.orFollows = orFollows;
 this.caseSensitive = caseSensitive;
 this.wordMatch = wordMatch;
 
 var reText = text.escapeRegExp();
 if (this.wordMatch) reText = "\\b"+reText+"\\b";
 this.regExp = new RegExp(reText, "m"+(caseSensitive ? "" : "i"));
};

// Internal.
//
STQ.Term.prototype.toString = function() {
 return (this.negate ? "-" : "")+(this.inTitle ? "!" : "")+(this.inText? "%" : "")+(this.inTag? "#" : "")+(this.wordMatch ? "=" : "")+'"'+this.text+'"'+ (this.orFollows ? " OR " : " AND ");
};

// Internal.
//
// Returns true if the term has a match in the given tiddler.
//
// @param tiddler [may be null]
//
STQ.Term.prototype.matchesTiddler = function(tiddler) {
 if (!tiddler) {
 return false;
 }
 
 if (this.inTitle && this.regExp.test(tiddler.title)) {
 return !this.negate;
 }
 if (this.inText && this.regExp.test(tiddler.text)) {
 return !this.negate;
 }
 if (this.inTag) {
 var tags = tiddler.tags;
 if (tags) {
 for (var i = 0; i < tags.length; i++) {
 if (this.regExp.test(tags[i])) {
 return !this.negate;
 }
 }
 }
 }
 
 return this.negate;
};

//----------------------------------------------------------------------------
// Utils
//----------------------------------------------------------------------------

var stringToInt = function(s, defaultValue) {
 if (!s) return defaultValue;
 var n = parseInt(s);
 return (n == NaN) ? defaultValue : n;
};

var getIntAttribute = function(elem, name, defaultValue) {
 return stringToInt(elem.getAttribute(name));
};

// Returns true if e is either self or a descendant (child, grandchild,...) of self.
//
// @param self DOM:Element
// @param e DOM:Element or null
//
var isDescendantOrSelf = function(self, e) {
 while (e != null) {
 if (self == e) return true;
 e = e.parentNode;
 }
 return false;
};

var getMatchCount = function(s, re) {
 var m = s.match(re);
 return m ? m.length : 0;
};

var createEllipsis = function(place) {
 var e = createTiddlyElement(place,"span");
 e.innerHTML = "&hellip;";
};

var isWordChar = function(c) {
 return (c >= "a" && c <= "z") || (c >= "A" && c <= "Z") || c == "_";
};

// Returns the bounds of the word in s around offset as a {start: , end:} object.
//
// Returns null when the char at offset is not a word char.
//
var getWordBounds = function(s, offset) {
 // Handle the "offset is not in word" case
 if (!isWordChar(s[offset])) return null;

 for (var i = offset-1; i >= 0 && isWordChar(s[i]); i--) 
 {/*empty*/}
 
 var startIndex = i+1;
 var n = s.length;
 for (i = offset+1; i < n && isWordChar(s[i]); i++) 
 {/*empty*/}
 
 return {start: startIndex, end: i};
};


var removeTextDecoration = function(s) {
 var removeThis = ["''", "{{{", "}}}", "//", "<<<", "/***", "***/"];
 var reText = "";
 for (var i = 0; i < removeThis.length; i++) {
 if (i != 0) reText += "|";
 reText += "("+removeThis[i].escapeRegExp()+")";
 }
 return s.replace(new RegExp(reText, "mg"), "").trim();
};

var logText = "";
var lastLogTime = null;
var logMessage = function(kind, s) {
 var now = new Date();
 var delta = lastLogTime ? (now-lastLogTime).toString() : "";
 logText += "<tr><td>"+now.convertToYYYYMMDDHHMMSSMMM()+"</td><td align='right'>"+delta+"</td><td>"+kind+"</td><td>"+s.htmlEncode()+"</td></tr>\n";
 lastLogTime = now;
};

function writeLog() {
 var t = " <<JsDoIt 'WriteLog' 'WriteLog' 'javascript:writeLog();story.closeTiddler(\"Log\");story.displayTiddler(null,\"Log\");'>>"+
 "<html><table><tbody><tr><th>Time</th><th>Delta (ms)</th><th>Kind</th><th>Message</th></tr>\n" + logText + "</tbody></table></html>";
 store.saveTiddler("Log", "Log",t,config.options.txtUserName,new Date(),["System", "Log"]);
 logText = "";
 lastLogTime = null;
}

//----------------------------------------------------------------------------
// The Search Core
//----------------------------------------------------------------------------

// Constants

// DOM IDs
var yourSearchResultID = "yourSearchResult";
var yourSearchResultItemsID = "yourSearchResultItems";

// Visual appearance of the result page
var maxCharsInTitle = 80;
var maxCharsInTags = 50;
var maxCharsInText = 250;
var maxPagesInNaviBar = 10; // Maximum number of pages listed in the navigation bar (before or after the current page)

var itemsPerPageDefault = 25; // Default maximum number of items on one search result page
var itemsPerPageWithPreviewDefault = 10; // Default maximum number of items on one search result page when PreviewText is on

// Context Calculation
var minMatchWithContextSize = 40; 
var maxMovementForWordCorrection = 4; // When a "match" context starts or end on a word the context borders may be changed to at most this amound to include or exclude the word.

// Ranking Weights
var matchInTitleWeight = 4;
var precisionInTitleWeight = 10;
var matchInTagsWeight = 2;

// Variables
var resultElement; // The (popup) DOM element containing the search result [may be null]
var lastResults; // Array of tiddlers that matched the last search
var lastQuery; // The last Search query (STQ)
var lastSearchText; // The last search text, as used to create the lastQuery
var searchInputField; // The "search" input field
var searchButton; // The "search" button
var firstIndexOnPage = 0; // The index of the first item of the lastResults list displayed on the search result page

var currentTiddler; // While creating the search result page the tiddler that is currently rendered.
var indexInPage; // The index (in the current page) of the tiddler currently rendered.
var indexInResult; // The index (in the result array) of the tiddler currently rendered.


var getItemsPerPage = function() {
 var n = (config.options.chkPreviewText) 
 ? stringToInt(config.options.txtItemsPerPageWithPreview, itemsPerPageWithPreviewDefault) 
 : stringToInt(config.options.txtItemsPerPage, itemsPerPageDefault);
 return (n > 0) ? n : 1;
};

var standardRankFunction = function(tiddler, query) { 
 // Count the matches in the title and the tags
 var markRE = query.getMarkRegExp();
 if (!markRE) return 1;
 
 var matchesInTitle = tiddler.title.match(markRE);
 var nMatchesInTitle = matchesInTitle ? matchesInTitle.length : 0;
 var nMatchesInTags = getMatchCount(tiddler.getTags(), markRE);

 // Calculate the "precision" of the matches in the title as the ratio of
 // the length of the matches to the total length of the title.
 var lengthOfMatchesInTitle = matchesInTitle ? matchesInTitle.join("").length : 0;
 var precisionInTitle = tiddler.title.length > 0 ? lengthOfMatchesInTitle/tiddler.title.length : 0;
 
 // calculate a weighted score
 var rank= nMatchesInTitle * matchInTitleWeight 
 + nMatchesInTags * matchInTagsWeight 
 + precisionInTitle * precisionInTitleWeight 
 + 1;

 return rank;
};

// @return Tiddler[]
//
var findMatches = function(store, searchText,caseSensitive,useRegExp,sortField,excludeTag) {
 lastSearchText = searchText;

 var candidates = store.reverseLookup("tags",excludeTag,false);
 var query = new STQ(searchText,caseSensitive, false, useRegExp); 
 lastQuery = query;

 var results = query.getMatchingTiddlers(candidates);

 // Rank the results
 var rankFunction = abego.YourSearch.getRankFunction();
 for (var i = 0; i < results.length; i++) {
 var tiddler = results[i];
 var rank = rankFunction(tiddler, query);
 // Add the rank information to the tiddler.
 // This is used during the sorting, but it may also
 // be used in the result, e.g. to display some "relevance" 
 // information in the result 
 tiddler.searchRank = rank; 
 }
 
 // sort the result, taking care of the rank and the sortField 
 if(!sortField) {
 sortField = "title";
 }
 
 var sortFunction = function (a,b) {
 var searchRankDiff = a.searchRank - b.searchRank;
 if (searchRankDiff == 0) {
 if (a[sortField] == b[sortField]) {
 return(0); 
 } else {
 return (a[sortField] < b[sortField]) ? -1 : +1; 
 }
 } else {
 return (searchRankDiff > 0) ? -1 : +1; 
 }
 };
 results.sort(sortFunction);
 
 lastResults = results;
 
 return results;
};


//----------------------------------------------------------------------------
// Handling "limited marked text" in the preview
//
// The found/matched texts should be displayed to the user in the preview. To make 
// it more useful the matched texts should be shown in their contexts, i.e. with
// some text around them. Since we only have limited space for the preview 
// (around two lines for the text preview, less for the tags and title) and 
// also don't want to both the user with "too much context" we use some 
// heuristics to find the "best context (size)". 
//
// On the other hand we want to use as much as possible of the preview area, 
// so if there is room left we also display as much text from the beginning
// of the text as possible. This gives the user some kind of "overall context"
// especiallay if the start of the text is introductorily.
//
// Text Ranges
//
// To represent the ranges that should be displayed "Range" object are used.
// This are objects with a "start" and "end" property. In a corresponding
// "Ranges array" these objects are sorted by their start and no range object 
// intersects/touches any other of the array.
//
//----------------------------------------------------------------------------

var moveToWordBorder = function(s, offset, isStartOffset) {
 var wordBounds;
 if (isStartOffset) {
 wordBounds = getWordBounds(s, offset);
 } else {
 if (offset <= 0) return offset;
 wordBounds = getWordBounds(s, offset-1);
 }
 if (!wordBounds) return offset;
 
 if (isStartOffset) {
 if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
 if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
 } else {
 if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
 if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
 }
 return offset;
};

var getContextRangeAround = function(s, startIndex, endIndex, matchCount, maxLen) {
 // Partition the available space into equal sized areas for each match and one 
 // for the text start.
 // But the size should not go below a certain limit
 var size = Math.max(Math.floor(maxLen/(matchCount+1)), minMatchWithContextSize);
 
 // Substract the size of the range to get the size of the context.
 var contextSize = Math.max(size-(endIndex-startIndex), 0);
 // Two thirds of the context should be before the match, one third after.
 var contextEnd = Math.min(Math.floor(endIndex+contextSize/3), s.length);
 var contextStart = Math.max(contextEnd - size, 0);

 // If the contextStart/End is inside a word and the end of the word is
 // close move the pointers accordingly to make the text more readable.
 contextStart = moveToWordBorder(s, contextStart, true);
 contextEnd = moveToWordBorder(s, contextEnd, false);
 
 return {start: contextStart, end: contextEnd};
};

// Splits s into a sequence of "matched" and "unmatched" substrings, using the 
// matchRegExp to do the matching.
// 
// Returns an array of objects with a "text" property containing the substring text. 
// Substrings that are "matches" also contain a boolean "isMatch" property set to true.
// 
// @param matchRegExp [may be null] when null no matching is performed and the returned 
// array just contains one item with s as its text
// 
var getTextAndMatchArray = function(s, matchRegExp) {
 var result = [];
 if (matchRegExp) {
 var startIndex = 0;
 var n = s.length;
 var currentLen = 0;
 do {
 matchRegExp.lastIndex = startIndex;
 var match = matchRegExp.exec(s);
 if (match) {
 if (startIndex < match.index) {
 var t = s.substring(startIndex, match.index);
 result.push({text:t});
 }
 result.push({text:match[0], isMatch:true});
 startIndex = match.index + match[0].length;
 } else {
 result.push({text: s.substr(startIndex)});
 break;
 }
 } while (true);
 } else {
 result.push({text: s});
 }
 return result;
};


var simpleCreateLimitedTextWithMarks = function(place, s, maxLen) {
 if (!lastQuery) return;
 
 var textAndMatches = getTextAndMatchArray(s, lastQuery.getMarkRegExp());
 var currentLen = 0;
 for (var i=0; i < textAndMatches.length && currentLen < maxLen; i++) {
 var t = textAndMatches[i];
 var text = t.text;
 if (t.isMatch) {
 createTiddlyElement(place,"span",null,"marked",text); 
 } else {
 var remainingLen = maxLen-currentLen;
 if (remainingLen < text.length) {
 text = text.substring(0, remainingLen)+"...";
 }
 createTiddlyText(place, text);
 }
 currentLen += text.length;
 }
};



var addRange = function(ranges, startIndex, endIndex) {
 var n = ranges.length;
 
 // When there are no ranges in ranges, just add it.
 if (n == 0) {
 ranges.push({start: startIndex, end: endIndex});
 return;
 }
 
 var i = 0;
 for (; i < n; i++) {
 var range = ranges[i];
 
 // find the first range that intersects or "touches" [startIndex, endIndex[
 if (range.start <= endIndex && startIndex <= range.end) {
 // Found.
 
 var r;
 // find the first range behind the new range that does not interfere
 var rIndex = i+1;
 for (; rIndex < n; rIndex++) {
 r = ranges[rIndex];
 if (r.start > endIndex || startIndex > range.end) {
 break;
 }
 }
 
 // Replace the ranges i to rIndex-1 with the union of the new range with these ranges.
 var unionStart = startIndex;
 var unionEnd = endIndex;
 for (var j = i; j < rIndex; j++) {
 r = ranges[j];
 unionStart = Math.min(unionStart, r.start);
 unionEnd = Math.max(unionEnd, r.end);
 }
 ranges.splice(i, rIndex-i, {start: unionStart, end: unionEnd});
 return; 
 }
 
 // if we found a range R that is right of the new range there is no
 // intersection and we can insert the new range before R.
 if (range.start > endIndex) {
 break;
 }
 }

 // When we are here the new range does not interfere with any range in ranges and
 // i is the index of the first range right to it (or ranges.length, when the new range
 // becomes the right most range). 

 ranges.splice(i, 0, {start: startIndex, end: endIndex});
};

var getTotalRangesSize = function(ranges) {
 var totalRangeSize = 0;
 for (var i=0; i < ranges.length; i++) {
 var range = ranges[i];
 totalRangeSize += range.end-range.start;
 }
 return totalRangeSize;
};

// Processes the text between startIndex and endIndex of the textAndMatches
// "writes" them (as DOM elements) at the given place, possibly as "marked" text.
//
// When endIndex is not the end of the full text an ellisis is appended. 
//
var writeTextAndMatchRange = function(place, s, textAndMatches, startIndex, endIndex) {
 var t;
 var text;
 
 // find the first text item to write
 var pos = 0;
 var i = 0;
 var offset = 0;
 for (;i < textAndMatches.length; i++) {
 t = textAndMatches[i];
 text = t.text;
 if (startIndex < pos+text.length) {
 offset = startIndex - pos;
 break;
 }
 pos += text.length;
 }
 
 var remainingLen = endIndex - startIndex;
 for (; i < textAndMatches.length && remainingLen > 0; i++) {
 t = textAndMatches[i];
 text = t.text.substr(offset);
 offset = 0;
 if (text.length > remainingLen) text = text.substr(0,remainingLen);
 
 if (t.isMatch) {
 createTiddlyElement(place,"span",null,"marked",text);
 } else {
 createTiddlyText(place, text);
 }
 remainingLen -= text.length;
 }
 
 if (endIndex < s.length) {
 createEllipsis(place);
 }
};

var getMatchedTextCount = function(textAndMatches) {
 var result = 0;
 for (var i=0; i < textAndMatches.length; i++) {
 if (textAndMatches[i].isMatch) {
 result++;
 }
 }
 return result; 
};

// Get all ranges around matched substrings with their contexts
//
var getMatchedTextWithContextRanges = function(textAndMatches, s, maxLen) {
 var ranges = [];
 var matchCount = getMatchedTextCount(textAndMatches);
 var pos = 0;
 for (var i=0; i < textAndMatches.length; i++) {
 var t = textAndMatches[i];
 var text = t.text;
 if (t.isMatch) {
 var range = getContextRangeAround(s, pos, pos+text.length, matchCount, maxLen);
 addRange(ranges, range.start, range.end);
 }
 pos += text.length;
 }
 return ranges;
};

var fillUpRanges = function(s, ranges, maxLen) {
 var remainingLen = maxLen - getTotalRangesSize(ranges);
 while (remainingLen > 0) {
 if (ranges.length == 0) {
 // No matches added yet. Make one large range.
 addRange(ranges, 0, moveToWordBorder(s, maxLen, false));
 return;
 } else {
 var range = ranges[0];
 var startIndex;
 var maxEndIndex;
 if (range.start == 0) {
 // The first range already starts at the beginning of the string.

 // When there is a second range fill to the next range start or to the maxLen.
 startIndex = range.end;
 if (ranges.length > 1) {
 maxEndIndex = ranges[1].start;
 } else {
 // Only one range. Add a range after that with the complete remaining len 
 // (corrected to "beautify" the output)
 addRange(ranges, startIndex, moveToWordBorder(s, startIndex+remainingLen, false));
 return;
 }
 } else {
 // There is unused space between the start of the text and the first range.
 startIndex = 0;
 maxEndIndex = range.start;
 }
 var endIndex = Math.min(maxEndIndex, startIndex+remainingLen);
 addRange(ranges, startIndex, endIndex);
 remainingLen -= (endIndex-startIndex);
 }
 }
};

// Write the given ranges of s, using textAndMatches for marking portions of the text.
//
var writeRanges = function(place, s, textAndMatches, ranges, maxLen) {
 if (ranges.length == 0) return;
 
 // When the first range is not at the start of the text write an ellipsis("...")
 // (Ellipses between ranges are written in the writeTextAndMatchRange method)
 if (ranges[0].start > 0) createEllipsis(place);

 var remainingLen = maxLen;
 for (var i = 0; i < ranges.length && remainingLen > 0; i++) {
 var range = ranges[i];
 var len = Math.min(range.end - range.start, remainingLen);
 writeTextAndMatchRange(place, s, textAndMatches, range.start, range.start+len);
 remainingLen -= len;
 }
};

var createLimitedTextWithMarksAndContext = function(place, s, maxLen) {
 if (!lastQuery) return;
 
 if (s.length < maxLen) maxLen = s.length;
 
 var textAndMatches = getTextAndMatchArray(s, lastQuery.getMarkRegExp());
 
 var ranges = getMatchedTextWithContextRanges(textAndMatches, s, maxLen);
 
 // When the maxLen is not yet reached add more ranges 
 // starting from the beginning until either maxLen or 
 // the end of the string is reached.
 fillUpRanges(s, ranges, maxLen);

 writeRanges(place, s, textAndMatches, ranges, maxLen);
};

var createLimitedTextWithMarks = function(place, s, maxLen) {
// return simpleCreateLimitedTextWithMarks(place, s, maxLen);
 return createLimitedTextWithMarksAndContext(place, s, maxLen);
};


//----------------------------------------------------------------------------
// The Search Result
//----------------------------------------------------------------------------

var myStorySearch = function(text,useCaseSensitive,useRegExp)
{
 highlightHack = new RegExp(useRegExp ? text:text.escapeRegExp(),useCaseSensitive ? "mg" : "img");
 var matches = findMatches(store, text,useCaseSensitive,useRegExp,"title","excludeSearch");

 firstIndexOnPage = 0;
 showResult();
 
 highlightHack = null;
};


var myMacroSearchHandler = function(place,macroName,params)
{
 var lastSearchText = "";
 var searchTimeout = null;
 var doSearch = function(txt)
 {
 if (config.options.chkUseYourSearch)
 myStorySearch(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
 else
 story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
 lastSearchText = txt.value;
 };
 var clickHandler = function(e)
 {
 doSearch(searchInputField);
 return false;
 };
 var keyHandler = function(e)
 {
 if (!e) var e = window.event;
 switch(e.keyCode)
 {
 case 13:
 doSearch(this);
 break;
 case 27:
 // When the result is open, close it, 
 // otherwise clear the content of the input field
 if (isResultOpen()) {
 closeResult();
 } else {
 this.value = "";
 clearMessage();
 }
 break;
 }
 if (String.fromCharCode(e.keyCode) == this.accessKey || e.altKey) 
 {
 reopenResultIfApplicable();
 }

 if(this.value.length<3 && searchTimeout) clearTimeout(searchTimeout);
 if((this.value.length > 2) && (this.value != lastSearchText))
 if (!config.options.chkUseYourSearch || config.options.chkSearchAsYouType)
 {
 if(searchTimeout)
 clearTimeout(searchTimeout);
 var txt = this;
 searchTimeout = setTimeout(function() {doSearch(txt);},500);
 }
 if (this.value.length == 0) 
 {
 closeResult();
 }
 };


 var focusHandler = function(e)
 {
 this.select();
 reopenResultIfApplicable();
 };

 var btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);
 var txt = createTiddlyElement(place,"input",null,null,null);
 if(params[0])
 txt.value = params[0];
 txt.onkeyup = keyHandler;
 txt.onfocus = focusHandler;
 txt.setAttribute("size",this.sizeTextbox);
 txt.setAttribute("accessKey",this.accessKey);
 txt.setAttribute("autocomplete","off");
 if(config.browser.isSafari)
 {
 txt.setAttribute("type","search");
 txt.setAttribute("results","5");
 }
 else
 txt.setAttribute("type","text");

 searchInputField = txt;
 searchButton = btn;
};

var isResultOpen = function() {
 return resultElement != null && resultElement.parentNode == document.body;
};

var closeResult = function() {
 if (isResultOpen()) {
 document.body.removeChild(resultElement);
 }
};


var openAllFoundTiddlers = function() {
 closeResult();
 if (lastResults) {
 var titles=[];
 for(var i = 0; i<lastResults.length; i++)
 titles.push(lastResults[i].title);
 story.displayTiddlers(null,titles);
 }
};

// Refreshes the content of the result with the current search result
// of the selected page.
//
// Assumes that the result is already open. 
//
var refreshResult = function() {
 if (!resultElement || !searchInputField) return;

 // Load the template for the YourSearchResult
 var html = store.getTiddlerText("YourSearchResultTemplate");
 if (!html) html = "<b>Tiddler YourSearchResultTemplate not found</b>";
 resultElement.innerHTML = html;

 // Ensure that the firstIndexOnPage is really a page start. 
 // This may have become violated when the ItemsPerPage are changed,
 // e.g. when switching between previewText and simple mode.
 firstIndexOnPage = Math.floor(firstIndexOnPage / getItemsPerPage()) * getItemsPerPage();
 
 // Expand the template macros etc.
 applyHtmlMacros(resultElement,null);
 refreshElements(resultElement,null);
 
 // When there are items found add them to the result page (pagewise)
 if (lastResults && lastResults.length > 0) {
 // Load the template how to display the items that represent a found tiddler
 var itemHtml = store.getTiddlerText("YourSearchItemTemplate");
 if (!itemHtml) alertAndThrow("YourSearchItemTemplate not found");
 
 // Locate the node that shall contain the list of found tiddlers
 var items = document.getElementById(yourSearchResultItemsID);
 if(!items)
 items = createTiddlyElement(resultElement,"div",yourSearchResultItemsID);

 // Add the items of the current page
 var endIndex = Math.min(firstIndexOnPage+getItemsPerPage(), lastResults.length);
 indexInPage = -1;
 for (var i=firstIndexOnPage; i < endIndex; i++) {
 currentTiddler = lastResults[i];
 indexInPage++;
 indexInResult = i;

 var item = createTiddlyElement(items,"div",null, "yourSearchItem");
 item.innerHTML = itemHtml;
 applyHtmlMacros(item,null);
 refreshElements(item,null);
 }
 }
 
 // The currentTiddler must only be defined while rendering the found tiddlers
 currentTiddler = null;

 ensureResultIsDisplayedNicely();
};

// Makes sure the result page has a good size and position and visible
// (may scroll the window)
//
var ensureResultIsDisplayedNicely = function() {
 adjustResultPositionAndSize();
 scrollVisible();
};

var scrollVisible = function() {
 // Scroll the window to make the result page (and the search Input field) visible.
 if (resultElement) window.scrollTo(0,ensureVisible(resultElement));
 if (searchInputField) window.scrollTo(0,ensureVisible(searchInputField));
};

// Adjusts the resultElement's size and position, relative to the search input field.
//
var adjustResultPositionAndSize = function() {
 if (!searchInputField) return;
 
 var root = searchInputField;
 
 // Position the result below the root and resize it if necessary.
 var rootLeft = findPosX(root);
 var rootTop = findPosY(root);
 var rootHeight = root.offsetHeight;
 var popupLeft = rootLeft;
 var popupTop = rootTop + rootHeight;

 // Make sure the result is not wider than the window
 var winWidth = findWindowWidth();
 if (winWidth < resultElement.offsetWidth) {
 resultElement.style.width = (winWidth - 100)+"px";
 winWidth = findWindowWidth();
 }

 // Ensure that the left and right of the result are not
 // clipped by the window. Move it to the left or right, if necessary. 
 var popupWidth = resultElement.offsetWidth;
 if(popupLeft + popupWidth > winWidth)
 popupLeft = winWidth - popupWidth-30;
 if (popupLeft < 0) popupLeft = 0;
 
 // Do the actual moving
 resultElement.style.left = popupLeft + "px";
 resultElement.style.top = popupTop + "px";
 resultElement.style.display = "block";
};

var showResult = function() {
 if (!resultElement) {
 resultElement = createTiddlyElement(document.body,"div",yourSearchResultID,"yourSearchResult");
 } else if (resultElement.parentNode != document.body) {
 document.body.appendChild(resultElement);
 }

 refreshResult();
};

var reopenResultIfApplicable = function() {
 if (searchInputField == null || !config.options.chkUseYourSearch) return;
 
 if ((searchInputField.value == lastSearchText) && lastSearchText && !isResultOpen()) {
 // For speedup we check re-use the previously created resultElement, if possible.
 if (resultElement && (resultElement.parentNode != document.body)) {
 document.body.appendChild(resultElement);
 ensureResultIsDisplayedNicely();
 } else {
 showResult();
 }
 }
};

var setFirstIndexOnPage = function(index) {
 if (!lastResults || lastResults.length == 0) return;

 firstIndexOnPage = Math.min(Math.max(0, index), lastResults.length-1);
 refreshResult(); 
};


var onDocumentClick = function(e) {
 // Close the search result page when the user clicks on the document
 // (and not into the searchInputField, on the search button or in the result)
 if (e.target == searchInputField) return; 
 if (e.target == searchButton) return; 
 if (resultElement && isDescendantOrSelf(resultElement, e.target)) return; 
 
 closeResult();
};

var onDocumentKeyup = function(e) {
 // Close the search result page when the user presses "ESC"
 if (e.keyCode == 27) closeResult();
};
addEvent(document,"click",onDocumentClick);
addEvent(document,"keyup",onDocumentKeyup);


//----------------------------------------------------------------------------
// Macros
//----------------------------------------------------------------------------

// ====Macro yourSearch ================================================

config.macros.yourSearch = {
 // Standard Properties
 label: "yourSearch",
 prompt: "Gives access to the current/last YourSearch result",

 funcs: {},
 
 tests: {
 "true" : function() {return true;},
 "false" : function() {return false;},
 "found" : function() {return lastResults && lastResults.length > 0;},
 "previewText" : function() {return config.options.chkPreviewText;}
 }
};

config.macros.yourSearch.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (params.length == 0) return;

 var name = params[0];
 var func = config.macros.yourSearch.funcs[name];
 if (func) func(place,macroName,params,wikifier,paramString,tiddler);
};

config.macros.yourSearch.funcs.itemRange = function(place) {
 if (lastResults) {
 var endIndex = Math.min(firstIndexOnPage+getItemsPerPage(), lastResults.length);
 var s = "%0 - %1".format([firstIndexOnPage+1,endIndex]);
 createTiddlyText(place, s);
 }
};

config.macros.yourSearch.funcs.count = function(place) {
 if (lastSearchText) {
 createTiddlyText(place, lastResults.length.toString());
 }
};

config.macros.yourSearch.funcs.query = function(place) {
 if (lastResults) {
 createTiddlyText(place, lastSearchText);
 }
};

config.macros.yourSearch.funcs.version = function(place) {
 var t = "YourSearch %0.%1.%2".format(
 [version.extensions.YourSearchPlugin.major, 
 version.extensions.YourSearchPlugin.minor, 
 version.extensions.YourSearchPlugin.revision]);
 var e = createTiddlyElement(place, "a");
 e.setAttribute("href", "http://tiddlywiki.abego-software.de/#YourSearchPlugin");
 e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">'+t+'<font>';
};

config.macros.yourSearch.funcs.copyright = function(place) {
 var e = createTiddlyElement(place, "a");
 e.setAttribute("href", "http://tiddlywiki.abego-software.de");
 e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">&copy; 2005-2006 <b><font color="red">abego</font></b> Software<font>';
};


config.macros.yourSearch.funcs.linkButton = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (params < 2) return;
 
 var tiddlyLink = params[1];
 var text = params < 3 ? tiddlyLink : params[2];
 var tooltip = params < 4 ? text : params[3];
 var accessKey = params < 5 ? null : params[4];
 
 var btn = createTiddlyButton(place,text,tooltip,closeResultAndDisplayTiddler,null,null, accessKey);
 btn.setAttribute("tiddlyLink",tiddlyLink);
};

config.macros.yourSearch.funcs.closeButton = function(place,macroName,params,wikifier,paramString,tiddler) {
 var button = createTiddlyButton(place, "close", "Close the Search Results (Shortcut: ESC)", closeResult);
};

config.macros.yourSearch.funcs.openAllButton = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!lastResults) return;
 var n = lastResults.length;
 if (n == 0) return;

 var title = n == 1 ? "open tiddler" : "open all %0 tiddlers".format([n]);
 var button = createTiddlyButton(place, title, "Open all found tiddlers (Shortcut: Alt-O)", openAllFoundTiddlers);
 button.setAttribute("accessKey","O");
};

var onNaviButtonClick = function(e) {
 if (!e) var e = window.event;
 var pageIndex = getIntAttribute(this, "page");
 setFirstIndexOnPage(pageIndex * getItemsPerPage(), 0);
};

config.macros.yourSearch.funcs.naviBar = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!lastResults || lastResults.length == 0) return;

 var button;
 var currentPageIndex = Math.floor(firstIndexOnPage / getItemsPerPage());
 var lastPageIndex = Math.floor((lastResults.length-1) / getItemsPerPage());
 if (currentPageIndex > 0) {
 button = createTiddlyButton(place, "Previous", "Go to previous page (Shortcut: Alt-'<')", onNaviButtonClick, "prev");
 button.setAttribute("page",(currentPageIndex-1).toString());
 button.setAttribute("accessKey","<");
 }

 for (var i = -maxPagesInNaviBar; i < maxPagesInNaviBar; i++) {
 var pageIndex = currentPageIndex+i;
 if (pageIndex < 0) continue;
 if (pageIndex > lastPageIndex) break;

 var pageNo = (i+currentPageIndex+1).toString();
 var buttonClass = pageIndex == currentPageIndex ? "currentPage" : "otherPage";
 button = createTiddlyButton(place, pageNo, "Go to page %0".format([pageNo]), onNaviButtonClick, buttonClass);
 button.setAttribute("page",(pageIndex).toString());
 }
 
 if (currentPageIndex < lastPageIndex) {
 button = createTiddlyButton(place, "Next", "Go to next page (Shortcut: Alt-'>')", onNaviButtonClick, "next");
 button.setAttribute("page",(currentPageIndex+1).toString());
 button.setAttribute("accessKey",">");
 }
};


config.macros.yourSearch.funcs["if"] = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (params.length < 2) return;
 
 var testName = params[1];
 var negate = (testName == "not");
 if (negate) {
 if (params.length < 3) return;
 testName = params[2];
 }
 
 var test = config.macros.yourSearch.tests[testName];
 var showIt = false;
 try {
 if (test) {
 showIt = test(place,macroName,params,wikifier,paramString,tiddler) != negate;
 } else {
 // When no predefined test is specified try to evaluate it as a JavaScript expression.
 showIt = (!eval(testName)) == negate;
 }
 } catch (ex) {
 }
 
 if (!showIt) {
 place.style.display="none";
 }
};

var createOptionWithRefresh = function(place, optionParams, wikifier,tiddler) {
 invokeMacro(place,"option",optionParams,wikifier,tiddler);
 // The option macro appended the component at the end of the place.
 var elem = place.lastChild;
 var oldOnClick = elem.onclick;
 elem.onclick = function(e) {
 var result = oldOnClick.apply(this, arguments);
 refreshResult();
 return result;
 };
 return elem;
};

config.macros.yourSearch.funcs.chkPreviewText = function(place,macroName,params,wikifier,paramString,tiddler) {
 var optionParams = params.slice(1).join(" ");
 
 var elem = createOptionWithRefresh(place, "chkPreviewText", wikifier,tiddler);
 elem.setAttribute("accessKey", "P");
 elem.title = "Show text preview of found tiddlers (Shortcut: Alt-P)"; 
 return elem;
};

// ====Macro foundTiddler ================================================

config.macros.foundTiddler = {
 // Standard Properties
 label: "foundTiddler",
 prompt: "Provides information on the tiddler currently processed on the YourSearch result page",
 
 funcs: {}
};


config.macros.foundTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!currentTiddler) return;
 var name = params[0];
 var func = config.macros.foundTiddler.funcs[name];
 if (func) func(place,macroName,params,wikifier,paramString,tiddler);
};

// Closes the Search Result window and displays the tiddler 
// defined by the "tiddlyLink" attribute of this element
//
var closeResultAndDisplayTiddler = function(e)
{
 closeResult();
 
 var title = this.getAttribute("tiddlyLink");
 if(title) {
 var withHilite = this.getAttribute("withHilite");
 var oldHighlightHack = highlightHack;
 if (withHilite && withHilite=="true" && lastQuery) {
 highlightHack = lastQuery.getMarkRegExp();
 }
 story.displayTiddler(this,title);
 highlightHack = oldHighlightHack;
 }
 return(false);
};

// Returns the "shortcut number" of the currentTiddler. 
// I.e. When the user presses Alt-n the given tiddler is opened/display.
//
// @return 0-9 or -1 when no number is defined
//
var getShortCutNumber = function() {
 if (!currentTiddler) return -1;
 
 if (indexInPage >= 0 && indexInPage <= 9) {
 return indexInPage < 9 ? (indexInPage+1) : 0;
 } else {
 return -1;
 }
};

config.macros.foundTiddler.funcs.title = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!currentTiddler) return;
 
 var shortcutNumber = getShortCutNumber();
 var tooltip = shortcutNumber >= 0 
 ? "Open tiddler (Shortcut: Alt-%0)".format([shortcutNumber.toString()])
 : "Open tiddler";

 var btn = createTiddlyButton(place,null,tooltip,closeResultAndDisplayTiddler,null);
 btn.setAttribute("tiddlyLink",currentTiddler.title);
 btn.setAttribute("withHilite","true");
 
 createLimitedTextWithMarks(btn, currentTiddler.title, maxCharsInTitle);

 if (shortcutNumber >= 0) {
 btn.setAttribute("accessKey",shortcutNumber.toString());
 }
};

config.macros.foundTiddler.funcs.tags = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!currentTiddler) return;

 createLimitedTextWithMarks(place, currentTiddler.getTags(), maxCharsInTags);
};

config.macros.foundTiddler.funcs.text = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (!currentTiddler) return;

 createLimitedTextWithMarks(place, removeTextDecoration(currentTiddler.text), maxCharsInText);
};


// Renders the "shortcut number" of the current tiddler, to indicate to the user
// what number to "Alt-press" to open the tiddler.
//
config.macros.foundTiddler.funcs.number = function(place,macroName,params,wikifier,paramString,tiddler) {
 var numberToDisplay = getShortCutNumber();
 if (numberToDisplay >= 0) {
 var text = "%0)".format([numberToDisplay.toString()]);
 createTiddlyElement(place,"span",null,"shortcutNumber",text);
 }
};

function scrollToAnchor(name) {
 return false;
}
//----------------------------------------------------------------------------
// Configuration Stuff
//----------------------------------------------------------------------------

if (config.options.chkUseYourSearch == undefined) config.options.chkUseYourSearch = true;
if (config.options.chkPreviewText == undefined) config.options.chkPreviewText = true;
if (config.options.chkSearchAsYouType == undefined) config.options.chkSearchAsYouType=true;
if (config.options.chkSearchInTitle == undefined) config.options.chkSearchInTitle=true;
if (config.options.chkSearchInText == undefined) config.options.chkSearchInText=true;
if (config.options.chkSearchInTags == undefined) config.options.chkSearchInTags=true;
if (config.options.txtItemsPerPage == undefined) config.options.txtItemsPerPage =itemsPerPageDefault;
if (config.options.txtItemsPerPageWithPreview == undefined) config.options.txtItemsPerPageWithPreview=itemsPerPageWithPreviewDefault;

config.shadowTiddlers.AdvancedOptions += "\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]])//";

//----------------------------------------------------------------------------
// Shadow Tiddlers
//----------------------------------------------------------------------------

config.shadowTiddlers["YourSearch Introduction"] = 
 "!About YourSearch\n"+
 "\n"+
 "YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!\n"+
 "\n"+
 "''May the '~Alt-F' be with you.''\n"+
 "\n"+
 "\n"+
 "!Features\n"+
 "* YourSearch searches for tiddlers that match your query ''as you type'' into the 'search' field. It presents a list of the ''\"Top Ten\"'' tiddlers in a ''popup-like window'': the ''[[YourSearch Result]]''. The tiddlers currently displayed in your TiddlyWiki are not affected.\n"+
 "* Using ''~TiddlerRank technology'' the [[YourSearch Result]] lists the ''most interesting tiddlers first''.\n"+
 "* Through ''Filtered Search'' and ''Boolean Search'' you can easily refining your search, like excluding words or searching for multiple words. This way less tiddlers are displayed in the [[YourSearch Result]] and you can faster scan the result for the tiddler you are looking for.\n"+
 "* The [[YourSearch Result]] lists the found tiddlers ''page-wise'', e.g. 10 per page. Use the ''Result Page Navigation Bar'' to navigate between pages if the result does not fit on one page.\n"+
 "* The [[YourSearch Result]] states the ''total number of found tiddlers''. This way you can quickly decide if you want to browse the result list or if you want to refine your search first to shorten the result list.\n"+
 "* Beside the ''title of the found tiddlers'' the [[YourSearch Result]] also ''displays tags'' and ''tiddler text previews''. The ''tiddler text preview'' is an extract of the tiddler's content, showing the most interesting parts related to your query (e.g. the texts around the words you are looking for).\n"+
 "* The words you are looking for are hilited in the titles, tags and text previews of the [[YourSearch Result]].\n"+
 "* If you are not interested in the tiddler text previews but prefer to get longer lists of tiddlers on one result page you may ''switch of the text preview''.\n"+
 "* If the [[YourSearch Result]] contains the tiddler you are looking for you can just ''click its title to display'' it in your TiddlyWiki. Alternatively you may also ''open all found tiddlers'' at once. \n"+
 "* Use [[YourSearch Options]] to customize YourSearch to your needs. E.g. depending on the size of your screen you may change the number of tiddlers displayed in the [[YourSearch Result]]. In the [[YourSearch Options]] and the AdvancedOptions you may also switch off YourSearch in case you temporarily want to use the standard search.\n"+
 "* For the most frequently actions ''access keys'' are defined so you can perform your search without using the mouse.\n"+
 "\n"
 ;

config.shadowTiddlers["YourSearch Help"] = 
// "<html><a name='Top'/>"+
// "<a href='javascript:scrollToAnchor(\"Filtered\");'>[Filtered Search] </a>"+
// "<a href='#Boolean'>[Boolean Search] </a>"+
// "<a href='#Exact'>['Exact Word' Search] </a>"+
// "<a href='#Combined'>[Combined Search] </a>"+
// "<a href='#Case'>[CaseSensitiveSearch and RegExpSearch] </a>"+
// "<a href='#Access'>[Access Keys] </a>"+
// "</html>"+
 "<<tiddler [[YourSearch Introduction]]>>"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!Filtered Search<html><a name='Filtered'/></html>\n"+
 "Using the Filtered Search you can restrict your search to certain parts of a tiddler, e.g only search the tags or only the titles.\n"+
 "|!What you want|!What you type|!Example|\n"+
 "|Search ''titles only''|start word with ''!''|{{{!jonny}}}|\n"+
 "|Search ''contents only''|start word with ''%''|{{{%football}}}|\n"+
 "|Search ''tags only''|start word with ''#''|{{{#Plugin}}}|\n"+
 "\n"+
 "You may use more than one filter for a word. E.g. {{{!#Plugin}}} finds tiddlers containing \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the content).\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!Boolean Search<html><a name='Boolean'/></html>\n"+
 "The Boolean Search is useful when searching for multiple words.\n"+
 "|!What you want|!What you type|!Example|\n"+
 "|''All words'' must exist|List of words|{{{jonny jeremy}}}|\n"+
 "|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n"+
 "|A word ''must not exist''|Start word with ''-''|{{{-jonny}}}|\n"+
 "\n"+
 "''Note:'' When you specify two words, separated with a space, YourSearch finds all tiddlers that contain both words, but not necessarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!'Exact Word' Search<html><a name='Exact'/></html>\n"+
 "By default a search result all matches that 'contain' the searched text. \n"+
 " E.g. if you search for 'Task' you will get all tiddlers containing 'Task', but also 'CompletedTask', 'TaskForce' etc.\n"+
 "\n"+
 "If you only want to get the tiddlers that contain 'exactly the word' you need to prefix it with a '='. E.g. typing '=Task' will the tiddlers that contain the word 'Task', ignoring words that just contain 'Task' as a substring.\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!Combined Search<html><a name='Combined'/></html>\n"+
 "You are free to combine the various search options. \n"+
 "\n"+
 "''Examples''\n"+
 "|!What you type|!Result|\n"+
 "|{{{!jonny !jeremy -%football}}}| all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its titles, but no {{{football}}} in content.|\n"+
 "|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact word). Tags named 'CompletedTask', 'TaskForce' etc. are not considered.|\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!~CaseSensitiveSearch and ~RegExpSearch<html><a name='Case'/></html>\n"+
 "The standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearch. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"+
 "!Access Keys<html><a name='Access'/></html>\n"+
 "You are encouraged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. For quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n"+
 "\n"+
 "|!Key|!Operation|\n"+
 "|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search input field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the previous search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. Select tiddler.\" sequences.|\n"+
 "|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Result]] is already closed and the cursor is in the search input field the field's content is cleared so you start a new query.|\n"+
 "|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second etc. tiddler from the result list.|\n"+
 "|{{{Alt-O}}}|Opens all found tiddlers.|\n"+
 "|{{{Alt-P}}}|Toggles the 'Preview Text' mode.|\n"+
 "|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[YourSearch Result]].|\n"+
 "|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the {{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n"+
// "<html><sub><a href='#Top'>[Top]</a></sub></html>\n"+
 "\n"
 ;

config.shadowTiddlers["YourSearch Options"] = 
 "|>|!YourSearch Options|\n"+
 "|>|<<option chkUseYourSearch>> Use 'Your Search'|\n"+
 "|!|<<option chkPreviewText>> Show Text Preview|\n"+
 "|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required to start search)|\n"+
 "|!|Default Search Filter:<<option chkSearchInTitle>>Titles ('!') <<option chkSearchInText>>Texts ('%') <<option chkSearchInTags>>Tags ('#') <html><br><font size=\"-2\">The parts of a tiddlers that are searched when you don't explicitly specify a filter in the search text (using a '!', '%' or '#' prefix).</font></html>|\n"+
 "|!|Number of items on search result page: <<option txtItemsPerPage>>|\n"+
 "|!|Number of items on search result page with preview text: <<option txtItemsPerPageWithPreview>>|\n"
 ;
 
config.shadowTiddlers["YourSearchStyleSheet"] = 
 "/***\n"+
 "!~YourSearchResult Stylesheet\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".yourSearchResult {\n"+
 "\tposition: absolute;\n"+
 "\twidth: 800px;\n"+
 "\n"+
 "\tpadding: 0.2em;\n"+
 "\tlist-style: none;\n"+
 "\tmargin: 0;\n"+
 "\n"+
 "\tbackground: White;\n"+
 "\tborder: 1px solid DarkGray;\n"+
 "}\n"+
 "\n"+
 "/*}}}*/\n"+
 "/***\n"+
 "!!Summary Section\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".yourSearchResult .summary {\n"+
 "\tborder-bottom-width: thin;\n"+
 "\tborder-bottom-style: solid;\n"+
 "\tborder-bottom-color: #999999;\n"+
 "\tpadding-bottom: 4px;\n"+
 "}\n"+
 "\n"+
 ".yourSearchRange, .yourSearchCount, .yourSearchQuery {\n"+
 "\tfont-weight: bold;\n"+
 "}\n"+
 "\n"+
 ".yourSearchResult .summary .button {\n"+
 "\tfont-size: 10px;\n"+
 "\n"+
 "\tpadding-left: 0.3em;\n"+
 "\tpadding-right: 0.3em;\n"+
 "}\n"+
 "\n"+
 ".yourSearchResult .summary .chkBoxLabel {\n"+
 "\tfont-size: 10px;\n"+
 "\n"+
 "\tpadding-right: 0.3em;\n"+
 "}\n"+
 "\n"+
 "/*}}}*/\n"+
 "/***\n"+
 "!!Items Area\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".yourSearchResult .marked {\n"+
 "\tbackground: none;\n"+
 "\tfont-weight: bold;\n"+
 "}\n"+
 "\n"+
 ".yourSearchItem {\n"+
 "\tmargin-top: 2px;\n"+
 "}\n"+
 "\n"+
 ".yourSearchNumber {\n"+
 "\tcolor: #808080;\n"+
 "}\n"+
 "\n"+
 "\n"+
 ".yourSearchTags {\n"+
 "\tcolor: #008000;\n"+
 "}\n"+
 "\n"+
 ".yourSearchText {\n"+
 "\tcolor: #808080;\n"+
 "\tmargin-bottom: 6px;\n"+
 "}\n"+
 "\n"+
 "/*}}}*/\n"+
 "/***\n"+
 "!!Footer\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".yourSearchFooter {\n"+
 "\tmargin-top: 8px;\n"+
 "\tborder-top-width: thin;\n"+
 "\tborder-top-style: solid;\n"+
 "\tborder-top-color: #999999;\n"+
 "}\n"+
 "\n"+
 ".yourSearchFooter a:hover{\n"+
 "\tbackground: none;\n"+
 "\tcolor: none;\n"+
 "}\n"+
 "/*}}}*/\n"+
 "/***\n"+
 "!!Navigation Bar\n"+
 "***/\n"+
 "/*{{{*/\n"+
 ".yourSearchNaviBar a {\n"+
 "\tfont-size: 16px;\n"+
 "\tmargin-left: 4px;\n"+
 "\tmargin-right: 4px;\n"+
 "\tcolor: black;\n"+
 "\ttext-decoration: underline;\n"+
 "}\n"+
 "\n"+
 ".yourSearchNaviBar a:hover {\n"+
 "\tbackground-color: none;\n"+
 "}\n"+
 "\n"+
 ".yourSearchNaviBar .prev {\n"+
 "\tfont-weight: bold;\n"+
 "\tcolor: blue;\n"+
 "}\n"+
 "\n"+
 ".yourSearchNaviBar .currentPage {\n"+
 "\tcolor: #FF0000;\n"+
 "\tfont-weight: bold;\n"+
 "\ttext-decoration: none;\n"+
 "}\n"+
 "\n"+
 ".yourSearchNaviBar .next {\n"+
 "\tfont-weight: bold;\n"+
 "\tcolor: blue;\n"+
 "}\n"+
 "/*}}}*/\n"
 ;

config.shadowTiddlers["YourSearchResultTemplate"] = 
 "<!--\n"+
 "{{{\n"+
 "-->\n"+
 "<span macro=\"yourSearch if found\">\n"+
 "<!-- The Summary Header ============================================ -->\n"+
 "<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+
 " <tr>\n"+
 "\t<td align=\"left\">\n"+
 "\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearch itemRange\"></span>\n"+
 "\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+
 "\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n"+
 "\t</td>\n"+
 "\t<td class=\"yourSearchButtons\" align=\"right\">\n"+
 "\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel\">preview text</span>\n"+
 "\t\t<span macro=\"yourSearch openAllButton\"></span>\n"+
 "\t\t<span macro=\"yourSearch linkButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n"+
 "\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n"+
 "\t\t<span macro=\"yourSearch closeButton\"></span>\n"+
 "\t</td>\n"+
 " </tr>\n"+
 "</tbody></table>\n"+
 "\n"+
 "<!-- The List of Found Tiddlers ============================================ -->\n"+
 "<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPreview=\"10\"></div>\n"+
 "\n"+
 "<!-- The Footer (with the Navigation) ============================================ -->\n"+
 "<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+
 " <tr>\n"+
 "\t<td align=\"left\">\n"+
 "\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar\"></span>\n"+
 "\t</td>\n"+
 "\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearch copyright\"></span>\n"+
 "\t</td>\n"+
 " </tr>\n"+
 "</tbody></table>\n"+
 "<!-- end of the 'tiddlers found' case =========================================== -->\n"+
 "</span>\n"+
 "\n"+
 "\n"+
 "<!-- The \"No tiddlers found\" case =========================================== -->\n"+
 "<span macro=\"yourSearch if not found\">\n"+
 "<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+
 " <tr>\n"+
 "\t<td align=\"left\">\n"+
 "\t\tYourSearch Result: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n"+
 "\t</td>\n"+
 "\t<td class=\"yourSearchButtons\" align=\"right\">\n"+
 "\t\t<span macro=\"yourSearch linkButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n"+
 "\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n"+
 "\t\t<span macro=\"yourSearch closeButton\"></span>\n"+
 "\t</td>\n"+
 " </tr>\n"+
 "</tbody></table>\n"+
 "</span>\n"+
 "\n"+
 "\n"+
 "<!--\n"+
 "}}}\n"+
 "-->\n"
 ;

config.shadowTiddlers["YourSearchItemTemplate"] = 
 "<!--\n"+
 "{{{\n"+
 "-->\n"+
 "<span class='yourSearchNumber' macro='foundTiddler number'></span>\n"+
 "<span class='yourSearchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n"+
 "<span class='yourSearchTags' macro='foundTiddler tags'/></span>\n"+
 "<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='foundTiddler text'/></div></span>\n"+
 "<!--\n"+
 "}}}\n"+
 "-->"
 ;
config.shadowTiddlers["YourSearch"] = "<<tiddler [[YourSearch Help]]>>";

config.shadowTiddlers["YourSearch Result"] = "The popup-like window displaying the result of a YourSearch query.";


setStylesheet(
 store.getTiddlerText("YourSearchStyleSheet"),
 "yourSearch");

//----------------------------------------------------------------------------
// Install YourSearch
//----------------------------------------------------------------------------

// Overwrite the TiddlyWiki search handler and verify after a while 
// that nobody else has overwritten it.

var origMacros_search_handler = config.macros.search.handler;
config.macros.search.handler = myMacroSearchHandler;


var ownsOverwrittenFunctions = function() {
 var result = (config.macros.search.handler == myMacroSearchHandler);
 return result;
};

var checkForOtherHijacker = function() {
 if (!ownsOverwrittenFunctions()) {
 alert("Message from YourSearchPlugin:\n\n\n"+
 "Another plugin has disabled the 'Your Search' features.\n\n\n"+
 "You may disable the other plugin or change the load order of \n"+
 "the plugins (by changing the names of the tiddlers)\n"+ 
 "to enable the 'Your Search' features.");
 }
};

setTimeout(checkForOtherHijacker, 5000);


// === Public API =================================

abego.YourSearch.getStandardRankFunction = function() {
 return standardRankFunction;
};

abego.YourSearch.getRankFunction = function() {
 return abego.YourSearch.getStandardRankFunction();
};

abego.YourSearch.getCurrentTiddler = function() {
 return currentTiddler;
};

} // of "install only once"
//}}}
// Used Globals (for JSLint) ==============

// ... JavaScript Core
/*global alert,clearTimeout,confirm */
// ... TiddlyWiki Core
/*global Tiddler, applyHtmlMacros, clearMessage, createTiddlyElement, createTiddlyButton, createTiddlyText, ensureVisible ,findPosX, highlightHack, findPosY,findWindowWidth, invokeMacro, saveChanges, refreshElements, story */

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

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

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

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

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

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

<html><p style="text-align: left;"><font size="6">Course List Salamanca 2008-2009</font></p> <div align="center"><hr /></div> <p align="justify"><font face="Verdana, Arial, Helvetica, sans-serif"><b>NOTE FOR WAKE FOREST STUDENTS: </b>For minor and major requirements, you will need to follow the Wake Forest Bulletin of the year when you declare.<br />           <b>NOTE FOR NON-WAKE FOREST STUDENTS:</b> The following course equivalencies correspond to Wake Forest University. Please, check with your own institutions for course approvals and transferals. <br />           <span style="color: rgb(130, 35, 28);"><strong>Click on course name to download sillabus</strong></span> </font></p> <div align="justify"><hr />   <p style="margin-bottom: 0px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>198. Service Learning in Spanish Language. <span style="font-weight: normal;">(1.5 h) </span></strong><span style="font-weight: normal;">Experiential learning in a Spanish-speaking country that links academic instruction, the study abroad experience, and community involvement. Pass/Fail only. P&mdash;POI.</span></font></p>   <p style="margin-bottom: 0px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>199. Internship in Spanish Language. <span style="font-weight: normal;">(1.5h or 3h) </span></strong><span style="font-weight: normal;">Under faculty direction, a student undertakes a languages project in conjunction with a service commitment or internship in a Spanish-speaking country. Includes, but is not limited to, vocabulary building, keeping a journal, and reading professional material. Offered only in Salamanca. Pass/Fail only. P&mdash;SPN 319 or SPA 219; or POI.</span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It counts towards graduation. It does not count towards the major or minor in Spanish. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>201. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2019.pdf">Intensive Spanish.</a> <span style="font-weight: normal;">(1.5h)</span></strong><span style="font-weight: normal;"> Intensive study and practice of the oral and written language. Familiarization with Spanish culture and daily life. Classes in conversational and idiomatic Spanish, excursions to points of interest and lectures on selected topics. Pass/Fail only. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It does not count towards the Spanish major or minor. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>316. Spanish Conversation. <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Based on cultural materials intended to increase aural skills and oral pro?ciency by systematically increasing vocabulary and reinforcing the command of speci?c grammatical points. Counts toward the major. Same as SPA 2209. P&mdash;200-level course or equivalent.</span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>316I. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/316I.pdf">Language Study in the Context of an Internship.</a> <span style="font-weight: normal;">(1.5, 3h)</span></strong><span style="font-weight: normal;"> Development of oral pro?ciency and writing skills. Readings, discussions and writing assignments based on texts relevant to internships being undertaken by students. Must be taken in conjunction with 199. The combination and 199 may count as a maximum of three hours toward the major or minor. P&mdash;SPN 319 or SPA 219 or SPA 2199 or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>317. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2179en_espanol.pdf">Literary and Cultural Studies of Spain.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Study of the cultural pluralism of Spanish through selected literary and artistic works to promote understanding of Spain's historical development. Same as SPA 217 or 2179. P&mdash;200-level course or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">Required for the Spanish major and minor. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>318. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2189.pdf">Literary and Cultural Studies of Spanish America.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Study of selected major works of Spanish-American literature within their historical and cultural contexts. Emphasis is on these contexts, including political structures, intellectual currents, art, music, and ?lm, to promote understanding of Spanish-America's historical development. Same as SPA 218 or 2189. P&mdash;200-level course or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">Required for the Spanish major and minor. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>319. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2199grammar.pdf">Grammar and Composition.</a> <span style="font-weight: normal;">(4h)</span></strong><span style="font-weight: normal;"> Study of grammar, composition, and pronunciation, with extensive practice of the written and oral language. Same as SPA 219 or 2199. P&mdash;200-level course or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">Required for the Spanish major and minor. It can only be taken on the Wake Forest campus or at a Wake Forest sponsored program, such as the Salamanca program. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>332. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/3329syl.pdf">The Golden Age of Spain. </a><span style="font-weight: normal;">(3h) </span></strong><span style="font-weight: normal;">Close analysis of literary texts, such as Lazarillo de Tormes, and study of the history, art, politics, and economics of the sixteenth and seventeenth centuries, with emphasis on themes such as the writer and society, humanism, the picaresque, Catholic mysticism, and power and politics. P&mdash;SPN 317 or 318; or SPA 217 or 218; or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It fulfils the Spanish major requirement for an advanced course in Spanish Literature; as an elective towards the major; towards the minor requirement for an advanced course in literature. </font></p>   <p style="margin-right: 18px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>334. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/3749.pdf">Voices of Modern Spain.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Study of the multifaceted cultural identity of contemporary Spain through different literary genres, art, and ?lm. Same as SPA 374 or 3749. P&mdash;SPN 317 or 318; or SPA 217 or 218; or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It fulfils the major requirement for an advanced course in Spanish Literature; as an elective towards the major; the minor requirement for an advanced course in literature. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>349. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/3759.pdf">Special Topics in Spanish Literature and Culture.</a> <span style="font-weight: normal;">(1.5h or 3h)</span></strong><span style="font-weight: normal;"> Topics vary. Can be repeated for credit. Same as SPA 375 or 3759. P&mdash;SPN 317; or SPA 217 or 218; or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It fulfils the major requirement for an advanced course in Spanish Literature; as an elective towards the Spanish major; towards the Spanish minor requirement for an advanced course in literature. </font></p>   <p style="margin-right: 13px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>379. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/3879.pdf">Special Topics in Spanish-American Literature and Culture.</a> <span style="font-weight: normal;">(1.5h or 3h)</span></strong><span style="font-weight: normal;"> Topics vary. May be repeated for credit. Same as SPA 387 or 3879. P&mdash;SPN 317 or 318; or SPA 217 or 218; or POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It fulfils the Spanish major requirement for an advanced course in Spanish American Literature; as an elective towards the Spanish major; towards the Spanish minor requirement for an advanced course in literature. </font></p>   <p style="margin-right: 5px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>386. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2919business.pdf">International Business: Spain and Latin America.</a> <span style="font-weight: normal;">(3h) </span></strong><span style="font-weight: normal;">Study of the most characteristic features of the economic and ?nancial situation and perspectives in Spain and Latin America. Focus is on communicating successfully in the world of Hispanic business and on acquiring an international view of that world and its cultural differences. Counts as elective for the Spanish major. Same as SPA 3289. P&mdash;SPN 319 or SPA 219 or POI. </span></font></p>   <p style="margin-right: 5px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>389. Internship in Spanish for Business and the Professions.</strong> <span style="font-weight: normal;">(1.5h-3h) Under faculty supervision, a student completes an internship in a bilingual or Spanish-speaking business or professional setting as part of an abroad experience. Does not count toward major or minor. Same as SPA 3859. Pass/Fail only. P&mdash;SPA 329.<br />         <strong><br />         </strong></span><strong>ART 2029. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2029art.pdf">Spanish Art and Architecture.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> A study of the development and uniqueness of Spanish art and architecture within the framework of Mediterranean and Western art in general. Counts as an elective for the Spanish major. </span></font><br /><font face="Verdana, Arial, Helvetica, sans-serif">It fulfils Division III; it counts as an elective for the Spanish major and minor. </font></p>      <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>HST 2019. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2019historia.pdf">General History of Spain</a>. <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> History of Spain from the pre-Roman period to the present day. Counts as elective for the Spanish major.</span></font><br /><font face="Verdana, Arial, Helvetica, sans-serif">It counts as an elective for the major and minor in History and Spanish. </font></p>      <p style="margin-bottom: 16px; margin-right: 13px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>POL 2029. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2029pol.pdf">Political Structures of Present-day Spain.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Study of the various political elements which affect the modern Spanish state. Counts as an elective for the Spanish major. </span></font><br /><font face="Verdana, Arial, Helvetica, sans-serif">It counts as an elective for the major and minor in Political Sciences and Spanish.</font></p>   <p style="margin-right: 13px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>ECN 2719. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2719econPEIbilingual.pdf">Economics of the European Community.</a> <span style="font-weight: normal;">(3h) </span></strong><span style="font-weight: normal;">Study of the economic integration, history, community budget, commercial politics, agricultural policy, politics of regional development, other fields of community performance, and economic and monetary union in the European community. </span></font><br /><font face="Verdana, Arial, Helvetica, sans-serif">It counts as elective for the major/minor in Economics.</font></p>      <p style="margin-bottom: 68px; margin-right: 5px;"><font face="Verdana, Arial, Helvetica, sans-serif"> 	<b>109. Astronomy. </b>(4h.) Introductory study of the universe consisting of descriptive astronomy, the historical development of astronomical theories, and astrophysics. Knowledge of basic algebra and trigonometry is required. <br />         <br />         <strong>PHY 110. Introductory Physics. </strong>(4h.) Conceptual, non-calculus one semester survey of the essentials of physics.&nbsp; Not recommended for pre-med, science or math students. <br /> 	<br /> 	<b>BIO &amp; CHM 370. Biochemistry.</b> (3h.): Macromolecules and Metabolism. (3h) Lecture course introducing the principles of biochemistry including structure, function, and biosynthesis of biological molecules, analysis of enzyme function and activity, bioenergetics, and regulation of metabolic pathways.<br /> 	<br /> 	<b>111. College Chemistry I.</b> (3h) Fundamental chemical principles. +<br /> 	<b>111 L. College Chemistry I Lab. </b>(1h) Laboratory covers experimental  	aspects of basic concepts.<br /> 	<br /> 	<b>341. Physical Chemistry I.</b> (3h) Fundamentals of thermodynamics and  	phenomenological kinetics, and introductory computational methods. +<br /> 	<b>341 L. Physical Chemistry I Lab. </b>(1h)</font></p>   <div><hr /></div>   <p style="margin-bottom: 16px;"><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><span style="font-weight: bold;">Program of Integrated Education (PEI) </span></font></p>   <p style="margin-bottom: 12px; margin-right: 13px;"><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-weight: normal;"><span style="font-weight: normal;">As part of the University of Salamanca PEI program (Programa Especial Integrado), students may take regular courses with Spanish students in the following disciplines: anthropology, business, economics, education, linguistics, psychology, and translation/interpretation. </span>Courses offered only at the University of Salamanca in disciplines other than Spanish. Taught in Spanish. </span></font></p>   <p style="margin-right: 9px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>ANT 2029. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2029anthroPEI.pdf">Anthropology and Folklore.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Study of conceptual tools to understand the role of folklore in culture as a complex, integrated system with an emphasis on culture's communicative, cognitive and symbolic functions. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It counts as elective for the major/minor in Anthropology. </font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>BUS 2129. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2129busPEIenglish.pdf">Human Resource Management.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Focuses on leadership skills associated with human resources management (HRM). The traditional HRM functions of planning, recruitment, selection, training, development, and appraisal are addressed along with role of individual and group behaviors in HRM. P&mdash;BUS 211; SPN 319 or SPA 219; and POI. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif"><strong>BUS 2239. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2239PEIenglish.pdf">International Marketing.</a> <span style="font-weight: normal;">(3h)</span></strong><span style="font-weight: normal;"> Examines the role of marketing within the international sphere of economics, law, politics, and ?nance. International marketing activities as they apply to product, place, pricing, and promotion are addressed along with global marketing strategies. P&mdash;BUS 221; SPN 319 or SPA 219; and POI. </span></font></p>   <p style="margin-right: 13px;"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>ECN 2719. <a linkindex="1" href="http://www.wfu.edu/romancelanguages/study_abroad/Salamanca/docs/2719econPEIbilingual.pdf">Economics of the European Community.</a> <span style="font-weight: normal;">(3h) </span></strong><span style="font-weight: normal;">Study of the economic integration, history, community budget, commercial politics, agricultural policy, politics of regional development, other ?elds of community performance, and economic and monetary union in the European community. </span></font></p>   <p><font face="Verdana, Arial, Helvetica, sans-serif">It counts as elective for the major/minor in Economics.</font></p>   <p style="