function addLoadEvent(func) {addEvent(window,'load',func);};
function focused(){	var fc = document.getElementsByTagName("form");	for (var i=0; i<fc.length; i++) {if (fc[i].getAttribute('class')=='focused'||fc[i].getAttribute('className')=='focused'){var tf = fc[i];for(j=0; j<tf.elements.length; j++)if(tf.elements[j].type == "text" || tf.elements[j].type == "textarea" || tf.elements[j].type == "select-one" || tf.elements[j].type == "password"){var ff = function(){setHTMLClass(this,"focused");};addEvent(tf.elements[j],"focus",ff);var bf = function(){removeHTMLClass(this,"focused");};addEvent(tf.elements[j],"blur",bf);}}}setHTMLClass=function(e, c) {if (e) {if (e.className != "") {e.className += " " + c;} else {e.className = c;}}};removeHTMLClass=function(e, c) {if (e) {var newClass = new String(e.className);var result = "";newClass = newClass.split(' ');for (var i=0;i<newClass.length;i++) {if (newClass[i] != c) {result += newClass[i] + ' ';}}e.className = result;}};};
function addEvent(obj,type,fn){if (obj.addEventListener) {obj.addEventListener( type, fn, false );EventCache.add(obj, type, fn);} else if (obj.attachEvent) {obj["e"+type+fn] = fn;obj[type+fn] = function() { obj["e"+type+fn]( window.event ); };obj.attachEvent( "on"+type, obj[type+fn] );EventCache.add(obj, type, fn);} else obj["on"+type] = obj["e"+type+fn];}
var EventCache = function(){var listEvents = [];return {listEvents : listEvents,add : function(node, sEventName, fHandler){listEvents.push(arguments);},flush : function(){var i, item;for(i = listEvents.length - 1; i >= 0; i = i - 1){item = listEvents[i];if(item[0].removeEventListener){item[0].removeEventListener(item[1], item[2], item[3]);};if(item[1].substring(0, 2) != "on"){item[1] = "on" + item[1];};if(item[0].detachEvent){item[0].detachEvent(item[1], item[2]);};item[0][item[1]] = null;};}};}();
addEvent(window,'unload',EventCache.flush);
addLoadEvent(focused);

hs.graphicsDir = '/img/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.dimmingOpacity = 0.8;
hs.outlineType = 'rounded-white';
hs.captionEval = 'this.thumb.alt';
hs.marginBottom = 105 // make room for the thumbstrip and the controls
hs.numberPosition = 'caption';

// Add the slideshow providing the controlbar and the thumbstrip
	hs.graphicsDir = '/img/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.fadeInOut = true;
	hs.outlineType = 'glossy-dark';
	hs.wrapperClassName = 'dark';
	hs.captionEval = 'this.thumb.alt';
	hs.numberPosition = 'caption';
	hs.useBox = true;
	hs.width = 1000;
	hs.height = 700;
	hs.dimmingOpacity = 0.8;
	hs.headingText = '&nbsp'; // Add an empty heading text
 
	// Add the slideshow providing the controlbar and the thumbstrip
	hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			position: 'bottom center',
			opacity: .75,
			hideOnMouseOut: true
		},
		thumbstrip: {
			position: 'top center', // Set to top center
			mode: 'horizontal',
			relativeTo: 'expander',
			offsetY: -110 // Add negative offsetY
		}
	});
