
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - timeline.js - */
// http://www.naec.org.uk/portal_javascripts/timeline.js?original=1
var tl;
function onLoad(){var eventSource=new Timeline.DefaultEventSource();var bandInfos=[Timeline.createBandInfo({trackHeight:5.5,eventSource:eventSource,date:"Jan 01 1980 00:00:00 GMT",width:"80%",intervalUnit:Timeline.DateTime.MONTH,intervalPixels:6}),Timeline.createBandInfo({showEventText:false,trackHeight:0.5,trackGap:0.2,eventSource:eventSource,date:"Jan 01 1980 00:00:00 GMT",width:"20%",intervalUnit:Timeline.DateTime.YEAR,intervalPixels:6})];bandInfos[1].syncWith=0;bandInfos[1].highlight=true;bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout());tl=Timeline.create(document.getElementById("my-timeline"),bandInfos);Timeline.loadXML("naec.xml", function(xml,url){eventSource.loadXML(xml,url)})}
var resizeTimerID=null;
function onResize(){if(resizeTimerID==null){resizeTimerID=window.setTimeout(function(){resizeTimerID=null;tl.layout()},500)}}

/* - styleswitcher.js - */
// http://www.naec.org.uk/portal_javascripts/styleswitcher.js?original=1
function setActiveStyleSheet(title,reset){jq('link[rel*=style][title]').attr('disabled',true).find('[title='+title+']').attr('disabled',false);if(reset) createCookie("wstyle",title,365)};jq(function(){var style=readCookie("wstyle");if(style!=null) setActiveStyleSheet(style,0)});

/* - toc.js - */
// http://www.naec.org.uk/portal_javascripts/toc.js?original=1
jq(function(){var dest=jq('dl.toc dd.portletItem');var content=getContentArea();if(!content||!dest.length) return;dest.empty();var location=window.location.href;if(window.location.hash)
location=location.substring(0,location.lastIndexOf(window.location.hash));var stack=[];jq(content).find('*').filter(function(){return/^h[1234]$/.test(this.tagName.toLowerCase())}).not('.documentFirstHeading').each(function(i){var level=this.nodeName.charAt(1)-1;while(stack.length<level){var ol=jq('<ol>');if(stack.length){var li=jq(stack[stack.length-1]).children('li:last')
if(!li.length)
li=jq('<li>').appendTo(jq(stack[stack.length-1]))
li.append(ol)}
stack.push(ol)}
while(stack.length>level) stack.pop();jq(this).before(jq('<a name="section-'+i+'" />'));jq('<li>').append(jq('<a />').text(jq(this).text()).attr('href',location+'#section-'+i)).appendTo(jq(stack[stack.length-1]))});if(stack.length){jq('dl.toc').show();dest.append(stack[0])}});
