<!--  Shortcuts menu //-->

function menu_goto( menuform )
{
    // see http://www.thesitewizard.com/archive/navigation.shtml
    // for an explanation of this script and how to use it on your
    // own site

    var baseurl = "http://www.lancs.ac.uk/celt/celtweb/" ;
    selecteditem = menuform.newurl.selectedIndex ;
    newurl = menuform.newurl.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      location.href = baseurl + newurl ;
    }
}


function show_events_feed(){
<!--  the calendar/events page 'http://www.lancs.ac.uk/celt/celtweb/booking' contains an iframe that displays a domino page (as the events calendar is written in domino) //-->
<!-- ...The 'show_events_feed '  functionn replaces the 'src' of the iframe (which is the domino calendar URL by default) , with the URL of the Events RSS feed (which is also sent from domino) //-->
<!-- ... hence the iframe 'src' will change from 'http://luvle.lancs.ac.uk/CELT/Events.nsf/Events?OpenView' (the domino calendar URL)......to......'http://luvle.lancs.ac.uk/celt/events.nsf/Events/89D42719D5FAD7B1802573ED0060ECCB'  or similar....(the Events feed item) //-->
<!-- originally the page that the Events Feed redirected the user to would be OUTSIDE the CELT website template on a blank page ...by doing the above the user is directed to the exact Event they clicked on from the Event Feed, but the event is displayed WITHIN the CELT website template //-->
  

<!-- GET QUERY SRTING FROM URL  //-->

<!-- code on next line...change 'page' in '\bpage\' to be the variable name //-->
<!-- eg, if variable in url was '?item=', then code below would be '\bitem\' //-->
<!-- the '?' could be an '&' for some 'get' query string variables //-->
var str=location.search.match(/\bpage\= *([^\?]+)/);
var page = str[1];

<!-- select the original iframe where the domino events calendar is displayed //-->
var iframe_url = document.getElementById('events_calendar'); 

<!-- set the src to be the src of the rss item you want to display //-->
iframe_url.src = "http://luvle.lancs.ac.uk/CELT/Events.nsf/Events/" + page;

} 

function taxonomy_thumbnail_hide(){ 
<!-- HIDE TAXONOMY THUMBNAILS //-->
<!-- This script hides any images  on the TAXONOMY page... as images wont display because of a path error within the Taxonomy module //-->
<!-- it is a customised version of thumbnail_switch , so not all code is relevant....ive therefore commented it out, but may need to uncomment it at some point //-->
<!-- count the number of images on the page ( '-1' means 'minus the RSS feed icon' //-->
var number_of_images_on_page = (document.images.length - 1);
 
<!-- use x as a loop counter//-->
var x = 0;                                                 

<!-- BEGIN LOOP //-->
for (x = 0; x < number_of_images_on_page; x++){               
if(document.URL.match("http://www.lancs.ac.uk/celt/celtweb/taxonomy/term/")) {

<!-- the image name //-->                            
var str = document.images[x].src;

<!-- set the src and alt of the image to nothing //-->
document.images[x].src = (""); 
document.images[x].alt="";          

<!-- set the width and height of the image to zero //-->
document.images[x].style.width = "0";
document.images[x].style.height = "0";
document.images[x].width = "0";
document.images[x].height = "0";
}
}
                                                 
<!-- END LOOP//-->
}


function temporary_thumbnail_hide(){ 
<!-- HIDE FRONT PAGE THUMBNAILS UNTIL I HAVE IE six TO TEST ON//-->
<!-- This script hides any images  on the TAXONOMY page... as images wont display because of a path error within the Taxonomy module //-->
<!-- it is a customised version of thumbnail_switch , so not all code is relevant....ive therefore commented it out, but may need to uncomment it at some point //-->
<!-- count the number of images on the page ( '-1' means 'minus the RSS feed icon' //-->
var number_of_images_on_page = (document.images.length - 1);
 
<!-- use x as a loop counter//-->
var x = 0;                                                 

<!-- BEGIN LOOP //-->
for (x = 0; x < number_of_images_on_page; x++){               
if(document.URL == "http://www.lancs.ac.uk/celt/celtweb/" || document.URL.match("http://www.lancs.ac.uk/celt/celtweb/taxonomy/term/")) {

<!-- the image name //-->                            
var str = document.images[x].src;

<!-- set the src and alt of the image to nothing //-->
document.images[x].src = (""); 
document.images[x].alt="";          

<!-- set the width and height of the image to zero //-->
document.images[x].style.width = "0";
document.images[x].style.height = "0";
document.images[x].width = "0";
document.images[x].height = "0";
}
}
                                                 
<!-- END LOOP//-->
}

function preview_page(){}
