//This sets a date variable

var     oneDate        = new Date();

var     theYear         = oneDate.getFullYear();

var     terms  = "2003-"+ theYear +""

var copyright = "<!--footer and copyright info--><div id='footer'><div id='upper'><div id='fixwidth'><div id='chlogo'><a href='http://www.proquest.co.uk' title='ProQuest Home page opens in a new window' target='_blank'><img src='/images/logo_ch.gif' alt='This is a Chadwyck-Healey branded product from ProQuest. The ProQuest Home page will open in a new window' width='49' height='38' border='0'></a></div><ul><li><a target='_top' href='/about/webmaster.htm'>Contact us</a></li><li><a target='_top' href='/about/sitemap.htm' accesskey='3'>Site map</a></li><li><a target='_top' href='/about/access.htm' accesskey='0'>Accessibility</a></li><li class='nobar'><a target='_top' href='/about/privacy.htm'>Privacy policy</a></li></ul><div id='brandlogos'><a href='http://www.bfi.org.uk/' class='externalLink noBG' target='_blank'><img src='/images/logo_bfi_ftr.gif' width='50' height='28' border='0' alt='British Film Institute website' class='bfi'></a><a href='http://www.afi.com/' class='externalLink noBG' target='_blank'><img src='/images/logo_afi_ftr.gif' width='65' height='38' border='0' alt='AFI website' class='afi'></a></div></div></div><!--upper--><div id='lowerfooter'><p><a target='_top' href='/about/terms.htm'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> The American Film Institute.</p><p><a target='_top' href='/about/terms.htm'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> The British Film Institute.</p><p><a target='_top' href='/about/terms.htm'>Data arrangement and software</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> ProQuest LLC.<br/>All rights reserved.</p></div><!--lowerfooter--></div><!--footer-->";

var hmcopyright = "<div id='upperfooter'><div id='chlogo'><a href='http://www.proquest.co.uk' title='ProQuest Home page opens in a new window' target='_blank'><img src='/images/logo_ch.gif' alt='This is a Chadwyck-Healey branded product from ProQuest. The ProQuest Home page will open in a new window' width='49' height='38' border='0'></a></div><ul><li><a target=\"_top\" href='/about/webmaster.htm'>Contact us</a></li><li><a target='_top' href='/about/sitemap.htm' accesskey='3'>Site map</a></li><li><a target='_top' href='/about/access.htm' accesskey='0'>Accessibility</a></li><li class='nobar'><a href='/about/privacy.htm'>Privacy policy</a></li></ul><div id='brandlogos_nofiaf'><a href='http://www.bfi.org.uk/' class='externalLink noBG' target='_blank'><img src='/images/logo_bfi_ftr.gif' width='50' height='28' border='0' alt='British Film Institute website' class='bfi'></a><a href='http://www.afi.com/' class='externalLink noBG' target='_blank'><img src='/images/logo_afi_ftr.gif' width='65' height='38' border='0' alt='AFI website' class='afi'></a></div></div><!--upperfooter--><div id='lowerfooter'><p><a target='_top' href='/about/terms.htm'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> The American Film Institute.</p><p><a target='_top' href='/about/terms.htm'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> The British Film Institute.</p><p><a target='_top' href='/about/terms.htm'>Data arrangement and software</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> ProQuest LLC.<br/>All rights reserved.</p></div><!--lowerfooter-->";


function inc_stats_proc_req_change() {
	//dummy function	
}

// ajaxy stuff to increment pageimage stats.
function increment_stats() {
	if (window.XMLHttpRequest) {
		var request = new XMLHttpRequest();
		request.onreadystatechange = inc_stats_proc_req_change;
       		request.open("GET", "http://fiaf.chadwyck.com/imageserver/increment_stats.cgi", false);
       		request.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );
       		request.send(null);
	} else if (window.ActiveXObject) {
       		var request = new ActiveXObject("Microsoft.XMLHTTP");
        	if (request) {
        		request.onreadystatechange = inc_stats_proc_req_change;
            		request.open("GET", "http://fiaf.chadwyck.com/imageserver/increment_stats.cgi", false);
            		request.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );
               		request.send();
        	}
	}
	return true;
}



	
	
/*Standard Design jscript used for POPUP WINDOWS */	
	
/* add Array.push if needed (for IE5.x) */
if (Array.prototype.push == null) {
	Array.prototype.push = function(item) {
		this[this.length] = item; return this.length;
	}
}

/* Add Event function taken from http://www.dustindiaz.com/rock-solid-addevent/ */

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];
	}
}

/*	EventCache Version 1.0
	Copyright 2005 Mark Wubben
	Provides a way for automagically removing events from nodes and thus preventing memory leakage.
	See <http://novemberborn.net/javascript/event-cache> for more information.
	This software is licensed under the CC-GNU LGPL http://creativecommons.org/licenses/LGPL/2.1/ */
	
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;
			};
		}
	};
}();

/* doTheLinks manages all links in document with specific class names */

function doTheLinks() {
	if (!document.getElementsByTagName) return false;
	var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
		if (links[i].className && links[i].className.match("popUp")) {
			hideSpan = document.createElement('span');
			hideSpan.className = 'hidden';
			hideText = document.createTextNode(' - this link will open in a new window');
			hideSpan.appendChild(hideText);
			links[i].setAttribute("title", "This link will open in a new window");
			links[i].appendChild(hideSpan);
// IE 5 needs special treatment because it’s a bit special
if(!links[i].ownerDocument) {
				blankImg = document.createElement('img');
				blankImg.src = '/images/blank.gif';
				blankImg.className = 'borderNone';
				links[i].appendChild(blankImg);
			}
		}
		if (links[i].className && links[i].className.match("externalLink")) {
			hideSpan = document.createElement('span');
			hideSpan.className = 'hidden';
			hideText = document.createTextNode(' - link to external site, this link will open in a new window');
			hideSpan.appendChild(hideText);
			links[i].setAttribute("title", "Link to external site, this link will open in a new window");
			links[i].appendChild(hideSpan);
// IE 5 needs special treatment because it’s a bit special
if(!links[i].ownerDocument) {
				blankImg = document.createElement('img');
				blankImg.src = '/images/blank.gif';
				blankImg.className = 'borderNone';
				links[i].appendChild(blankImg);
			}
		}
		// attributes if single page only e.g. end session - named 'popUpSmall'
		// change PRODUCT for your product name and add attributes as required
		if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpSingle ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'FIOPopUpSingle','width=480,height=360,resizable=1,toolbar=1,location=0,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		} 
		// attributes if medium popup - named 'popUpHelp'
// change PRODUCT for your product name and add attributes as required
		else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpHelp ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'FIOPopUpHelp','width=500,height=480,resizable=1,toolbar=1,location=1,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		} 
		// attributes if large popup - named 'popUpMulti'
		// change PRODUCT for your product name and add attributes as required
		else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpMulti ') != -1 || (' ' + links[i].className + ' ').indexOf(' externalLink ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'','width=800,height=600,resizable=1,toolbar=1,location=1,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		}
	}
}

/* Focus any window as it loads */

function doFocus() {
	window.focus();
}

/* Calls for above functions */

addEvent(window,'load',doFocus);
addEvent(window,'load',doTheLinks);
addEvent(window,'unload',EventCache.flush);


/*END DESIGN JSCRIPT FOR POPUPS WINDOWS*/	