if ( pagename=="leisure"||pagename=="cultural" ) {
  dw('<div class="cbr">');
  dw('<img class="apl" src="images/activetomar.jpg" alt="" title="Click the picture to access CJ\'s Active Tomar blog" width="135" border="1" onclick="displayWebPage(\'www.activitiesintomar.blogspot.com\',\'en\',\'translate\')" />');
  dw('<img class="apr" src="images/cj2.jpg" alt="" title="Click the picture to email CJ" border="1" onclick="window.open(\'contactcj.php\',\'_parent\')" />');
  dw('<strong>We have our own local organiser, CJ</strong>, fluent in Portuguese and English, who will be pleased to arrange any of these activities, or anything else you may require during your stay. <strong>CJ</strong> will also, for a small fee, accompany you and your group if required to provide guide and translation services.');
  dw('<p><strong>CJ has his own blog with all the latest news about activities in Tomar.</strong> <em>Click on the picture to the left for more information (opens in a new window).</em></p>');
  dw('<p>If you have any questions or wish to find out more about activities, even if not shown on these pages, or anything else you would like to do during your stay, <em>click on the picture to the right</em> to email <strong>CJ</strong> direct with your requirements and he will endeavour to satisfy your wishes!</p></div>'); }

function changeActivity(an) {
  activities=new Array("leisure","cultural","golf","specialevents","restaurants","nature","treatments");
  if ( an<0 ) an=readCookie("ActivityNumber");
  if ( !amenus[an] ) an=0;
  menusbuttons=new Array();
  j=0;
  for ( i in amenus ) {
    menusbuttons[j]=amenus[i][0];
    j++;
    menusbuttons[j]=amenus[i][1];
    if ( i==an ) menusbuttons[j]='';
    j++; }
  setinnerHTML("amenus",showButtons("topmenu",menusbuttons,true,40,10));
  for ( var i in activities ) hideObject(activities[i]);
  showObject(activities[an]);
  createCookie("ActivityNumber",an);
  return; }

function displayActivity ( name,href,title,text,language,copyright,map ) {
  width=document.body.clientWidth;
  if ( name=="start" ) {
    dw('<hr /><table border="2" cellpadding="10" style="border:2px solid blue">');
    return; }
  if ( name=="end" ) {
    dw('</table>');
    return; }
  dw('<tr><td align="center" valign="top"><a name="'+name+'"');
  if ( href!="" ) dw('href="'+href+'" target="_blank"');
  dw('><img src="images/'+pagename+'_'+name+'.jpg" alt="" width="135" height="100" border="1" /></a>');
  if ( copyright ) dw('<br /><small>'+copyright);
  dw('</td><td align="left" valign="top">');
  dw('<p><strong>'+title+'</strong>'+text);
  if ( href!="" ) {
    dw('<p><em>Click on the picture for more information');
    if ( language!="" ) dw(' <strong>'+language+'</strong>');
    if ( language=="" ) dw(' <strong>in English</strong>');
    dw(' (opens in a new window).</em></p>'); }
  if ( map ) dw('<p>Click here for a map');
  dw('</td></tr>');
  return; }

