

// Browser Detect  v2.1.6
// documentation: http://www.dithered.com/javascript/browser_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)


function BrowserDetect() {
   var ua = navigator.userAgent.toLowerCase(); 

   // browser engine name
   this.isGecko       = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);

   // browser name
   this.isKonqueror   = (ua.indexOf('konqueror') != -1); 
   this.isSafari      = (ua.indexOf('safari') != - 1);
   this.isOmniweb     = (ua.indexOf('omniweb') != - 1);
   this.isOpera       = (ua.indexOf('opera') != -1); 
   this.isIcab        = (ua.indexOf('icab') != -1); 
   this.isAol         = (ua.indexOf('aol') != -1); 
   this.isIE          = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) ); 
   this.isMozilla     = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isFirebird    = (ua.indexOf('firebird/') != -1);
   this.isNS          = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
   
   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
   
   // rendering engine versions
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
   this.equivalentMozilla = ( (this.isGecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
   this.appleWebKitVersion = ( (this.isAppleWebKit) ? parseFloat( ua.substring( ua.indexOf('applewebkit/') + 12) ) : -1 );
   
   // browser version
   this.versionMinor = parseFloat(navigator.appVersion); 
   
   // correct version number
   if (this.isGecko && !this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
   }
   else if (this.isOmniweb) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('omniweb/') + 8 ) );
   }
   else if (this.isOpera) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera') + 6 ) );
   }
   else if (this.isIcab) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab') + 5 ) );
   }
   
   this.versionMajor = parseInt(this.versionMinor); 
   
   // dom support
   this.isDOM1 = (document.getElementById);
   this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

   // platform
   this.isWin    = (ua.indexOf('win') != -1);
   this.isWin32  = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
   this.isMac    = (ua.indexOf('mac') != -1);
   this.isUnix   = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
   this.isLinux  = (ua.indexOf('linux') != -1);
   
   // specific browser shortcuts
   this.isNS4x = (this.isNS && this.versionMajor == 4);
   this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
   this.isns47x = (this.isNS4x && this.versionMinor >= 4.7);
   this.isNS4up = (this.isNS && this.versionMinor >= 4);
   this.isNS6x = (this.isNS && this.versionMajor == 6);
   this.isNS6up = (this.isNS && this.versionMajor >= 6);
   this.isNS7x = (this.isNS && this.versionMajor == 7);
   this.isNS7up = (this.isNS && this.versionMajor >= 7);
   
   this.isIE4x = (this.isIE && this.versionMajor == 4);
   this.isIE4up = (this.isIE && this.versionMajor >= 4);
   this.isIE5x = (this.isIE && this.versionMajor == 5);
   this.isIE55 = (this.isIE && this.versionMinor == 5.5);
   this.isIE5up = (this.isIE && this.versionMajor >= 5);
   this.isIE6x = (this.isIE && this.versionMajor == 6);
   this.isIE6up = (this.isIE && this.versionMajor >= 6);
   
   this.isIE4xMac = (this.isIE4x && this.isMac);
}
var browser = new BrowserDetect();

// End Browser Detect script




function customizesylesheets(){

	if (screen.width < 1024){
	document.write('<link rel="stylesheet" type="text/css" href="http://rmc.library.cornell.edu/vote/css/size800.css" media="all" />')
	}
	
	
	if (!(browser.isGecko || browser.isIE5up || browser.isSafari)){
	
	document.write('<link rel="stylesheet" type="text/css" href="http://rmc.library.cornell.edu/vote/css/unsupported.css" />')
	
	document.write('<p><b>Attention:</b> This website does not support your current web browser, so it may not function and/or display as intended.<br/> Please consider using the latest version of <a href="http://mozilla.org/products/firefox/" target="_new">Firefox</a>, <a href="http://mozilla.org/products/mozilla1.x/" target="_new">Mozilla</a>, <a href="http://channels.netscape.com/ns/browsers/default.jsp" target="_new">Netscape</a>, <a href="http://www.microsoft.com/windows/ie/default.mspx" target="_new">Internet Explorer</a>, or <a href="http://www.apple.com/safari/" target="_new">Safari</a>.</p>')
	
	}

}




function sectionrecord(shortname, longname, url, subsectionexists){

this.shortname = shortname
this.longname = longname
this.url = url
this.subsectionexists = subsectionexists

}




function findsectionproperty (sectionname, propertyname, subsectionshortname){

eval('var sectionlist = ' + sectionname + 'sections')

	for (var i = 1; i < sectionlist.length; i++){
	
		if (sectionlist[i].shortname == subsectionshortname){
		eval ("var propertyvalue = sectionlist[i]." + propertyname)
		}
		
	}

return propertyvalue

}




var topsections = new Array()

topsections[1] = new sectionrecord("home","Home","http://rmc.library.cornell.edu/vote/index.html")
topsections[2] = new sectionrecord("exhibition","Exhibition","http://rmc.library.cornell.edu/vote/introduction/index.html","yes")
topsections[3] = new sectionrecord("links","Links","http://rmc.library.cornell.edu/vote/links.html")
topsections[4] = new sectionrecord("credits","Credits","http://rmc.library.cornell.edu/vote/credits.html")
topsections[5] = new sectionrecord("colophon","Colophon","http://rmc.library.cornell.edu/vote/colophon.html")
topsections[6] = new sectionrecord("events","Events","http://rmc.library.cornell.edu/vote/events.html")



	var exhibitionsections = new Array()
	
	exhibitionsections.longname = "Exhibition"

	exhibitionsections[1] = new sectionrecord("introduction","Introduction","http://rmc.library.cornell.edu/vote/introduction/index.html","yes")
	exhibitionsections[2] = new sectionrecord("hardcider","1840: Hard Cider and Log Cabins","http://rmc.library.cornell.edu/vote/1840/index.html","yes")
	exhibitionsections[3] = new sectionrecord("civilwar","1864: The Civil War Election","http://rmc.library.cornell.edu/vote/1864/index.html","yes")
	exhibitionsections[4] = new sectionrecord("reconstruction","1868: The Reconstruction Election","http://rmc.library.cornell.edu/vote/1868/index.html","yes")
	exhibitionsections[5] = new sectionrecord("surprise","1880: Surprise Candidates","http://rmc.library.cornell.edu/vote/1880/index.html","yes")
	exhibitionsections[6] = new sectionrecord("battlingstandards","1896: The Battling Standards","http://rmc.library.cornell.edu/vote/1896/index.html","yes")
	exhibitionsections[7] = new sectionrecord("threewayrace","1912: A Three-Way Race","http://rmc.library.cornell.edu/vote/1912/index.html","yes")
	exhibitionsections[8] = new sectionrecord("thirdterm","1940: A Third Term?","http://rmc.library.cornell.edu/vote/1940/index.html","yes")
	exhibitionsections[9] = new sectionrecord("likingike","1952: Liking Ike","http://rmc.library.cornell.edu/vote/1952/index.html","yes")
	exhibitionsections[10] = new sectionrecord("television","1960: Television and the Candidate","http://rmc.library.cornell.edu/vote/1960/index.html","yes")
	exhibitionsections[11] = new sectionrecord("tickets","Tickets &amp; Ballots","http://rmc.library.cornell.edu/vote/tickets/index.html","yes")
	exhibitionsections[12] = new sectionrecord("thirdparties","Third Party Candidates","http://rmc.library.cornell.edu/vote/thirdparties/index.html","yes")
	exhibitionsections[13] = new sectionrecord("symbols","Symbols &amp; Mascots","http://rmc.library.cornell.edu/vote/symbols/index.html","yes")
	
	
	
		var introductionsections = new Array()
	
		introductionsections.longname = "1840: Hard Cider and Log Cabins"

		introductionsections[1] = new sectionrecord("1","Presidential Portrait Tray","http://rmc.library.cornell.edu/vote/introduction/introduction_1.html")
		introductionsections[2] = new sectionrecord("2","The Susan H. Douglas Collection","http://rmc.library.cornell.edu/vote/introduction/introduction_2.html")
		introductionsections[3] = new sectionrecord("3","Washington Inauguration Items","http://rmc.library.cornell.edu/vote/introduction/introduction_3.html")
		introductionsections[4] = new sectionrecord("4","1796 Election","http://rmc.library.cornell.edu/vote/introduction/introduction_4.html")
		introductionsections[5] = new sectionrecord("5","Andrew Jackson Campaign Items","http://rmc.library.cornell.edu/vote/introduction/introduction_5.html")
		introductionsections[6] = new sectionrecord("6","Jackson Portrait Sewing Box","http://rmc.library.cornell.edu/vote/introduction/introduction_6.html")
		
		
		
		var hardcidersections = new Array()
	
		hardcidersections.longname = "Introduction"

		hardcidersections[1] = new sectionrecord("1","Log Cabins","http://rmc.library.cornell.edu/vote/1840/1840_1.html")
		hardcidersections[2] = new sectionrecord("2","Harrison Ribbons","http://rmc.library.cornell.edu/vote/1840/1840_2.html")
		hardcidersections[3] = new sectionrecord("3","Music","http://rmc.library.cornell.edu/vote/1840/1840_3.html")
		hardcidersections[4] = new sectionrecord("4","Van Buren","http://rmc.library.cornell.edu/vote/1840/1840_4.html")


		
		var civilwarsections = new Array()
	
		civilwarsections.longname = "1864: The Civil War Election"

		civilwarsections[1] = new sectionrecord("1","McClellan Poster","http://rmc.library.cornell.edu/vote/1864/1864_1.html")
		civilwarsections[2] = new sectionrecord("2","Campaign Songs","http://rmc.library.cornell.edu/vote/1864/1864_2.html")
		civilwarsections[3] = new sectionrecord("3","American Flag Banner","http://rmc.library.cornell.edu/vote/1864/1864_3.html")
		civilwarsections[4] = new sectionrecord("4","Campaign Buttons","http://rmc.library.cornell.edu/vote/1864/1864_4.html")
		civilwarsections[5] = new sectionrecord("5","Lydia Maria Child","http://rmc.library.cornell.edu/vote/1864/1864_5.html")
		

		
		var reconstructionsections = new Array()
	
		reconstructionsections.longname = "1868: The Reconstruction Election"

		reconstructionsections[1] = new sectionrecord("1","Grant Ribbon &amp; Badges","http://rmc.library.cornell.edu/vote/1868/1868_1.html")
		reconstructionsections[2] = new sectionrecord("2","Grant Walking Stick","http://rmc.library.cornell.edu/vote/1868/1868_2.html")
		reconstructionsections[3] = new sectionrecord("3","Grant Plate","http://rmc.library.cornell.edu/vote/1868/1868_3.html")
		reconstructionsections[4] = new sectionrecord("4","Republican &#8220;Banner&#8221;","http://rmc.library.cornell.edu/vote/1868/1868_4.html")
		reconstructionsections[5] = new sectionrecord("5","Grant Music","http://rmc.library.cornell.edu/vote/1868/1868_5.html")
		reconstructionsections[6] = new sectionrecord("6","Grant Match Holder","http://rmc.library.cornell.edu/vote/1868/1868_6.html")
		reconstructionsections[7] = new sectionrecord("7","Seymour Box","http://rmc.library.cornell.edu/vote/1868/1868_7.html")
		
		
		
		var surprisesections = new Array()
	
		surprisesections.longname = "1880: Surprise Candidates"

		surprisesections[1] = new sectionrecord("1","The Bird to Bet On!","http://rmc.library.cornell.edu/vote/1880/1880_1.html")
		surprisesections[2] = new sectionrecord("2","Hancock Rebus Pins","http://rmc.library.cornell.edu/vote/1880/1880_2.html")
		surprisesections[3] = new sectionrecord("3","Democratic Ticket","http://rmc.library.cornell.edu/vote/1880/1880_3.html")
		surprisesections[4] = new sectionrecord("4","1880 Republican Letter","http://rmc.library.cornell.edu/vote/1880/1880_4.html")
		surprisesections[5] = new sectionrecord("5","Towpath Pennant","http://rmc.library.cornell.edu/vote/1880/1880_5.html")
		surprisesections[6] = new sectionrecord("6","Snuff Box","http://rmc.library.cornell.edu/vote/1880/1880_6.html")



		var battlingstandardssections = new Array()
	
		battlingstandardssections.longname = "1896: The Battling Standards"

		battlingstandardssections[1] = new sectionrecord("1","Bryan Pennant","http://rmc.library.cornell.edu/vote/1896/1896_1.html")
		battlingstandardssections[2] = new sectionrecord("2","Bryan Buttons","http://rmc.library.cornell.edu/vote/1896/1896_2.html")
		battlingstandardssections[3] = new sectionrecord("3","McKinley Buttons","http://rmc.library.cornell.edu/vote/1896/1896_3.html")
		battlingstandardssections[4] = new sectionrecord("4","Bryan &#8220;Money&#8221;","http://rmc.library.cornell.edu/vote/1896/1896_4.html")
		battlingstandardssections[5] = new sectionrecord("5","McKinley Medallion","http://rmc.library.cornell.edu/vote/1896/1896_5.html")
		battlingstandardssections[6] = new sectionrecord("6","Hobart Fan","http://rmc.library.cornell.edu/vote/1896/1896_6.html")
		battlingstandardssections[7] = new sectionrecord("7","Procession Badge","http://rmc.library.cornell.edu/vote/1896/1896_7.html")
		battlingstandardssections[8] = new sectionrecord("8","McKinley Ribbon","http://rmc.library.cornell.edu/vote/1896/1896_8.html")
		battlingstandardssections[9] = new sectionrecord("9","Kansas Ribbon","http://rmc.library.cornell.edu/vote/1896/1896_9.html")
		
		
		
		var threewayracesections = new Array()
	
		threewayracesections.longname = "1912: A Three-Way Race"

		threewayracesections[1] = new sectionrecord("1","TR Kerchief","http://rmc.library.cornell.edu/vote/1912/1912_1.html")
		threewayracesections[2] = new sectionrecord("2","Roosevelt Portrait","http://rmc.library.cornell.edu/vote/1912/1912_2.html")
		threewayracesections[3] = new sectionrecord("3","Wilson Pennant","http://rmc.library.cornell.edu/vote/1912/1912_3.html")
		threewayracesections[4] = new sectionrecord("4","Wilson Postcards","http://rmc.library.cornell.edu/vote/1912/1912_4.html")
		threewayracesections[5] = new sectionrecord("5","Wilson Buttons","http://rmc.library.cornell.edu/vote/1912/1912_5.html")
		threewayracesections[6] = new sectionrecord("6","Taft Postcard","http://rmc.library.cornell.edu/vote/1912/1912_6.html")
		threewayracesections[7] = new sectionrecord("7","Taft Buttons","http://rmc.library.cornell.edu/vote/1912/1912_7.html")
		threewayracesections[8] = new sectionrecord("8","Motion Slide ","http://rmc.library.cornell.edu/vote/1912/1912_8.html")
		
		
		
		var thirdtermsections = new Array()
	
		thirdtermsections.longname = "1940: A Third Term?"

		thirdtermsections[1] = new sectionrecord("1","White House Tray","http://rmc.library.cornell.edu/vote/1940/1940_1.html")
		thirdtermsections[2] = new sectionrecord("2","FDR Pipe","http://rmc.library.cornell.edu/vote/1940/1940_2.html")
		thirdtermsections[3] = new sectionrecord("3","Keep FDR Buttons","http://rmc.library.cornell.edu/vote/1940/1940_3.html")
		thirdtermsections[4] = new sectionrecord("4","Uncut Buttons","http://rmc.library.cornell.edu/vote/1940/1940_4.html")
		thirdtermsections[5] = new sectionrecord("5","Introducing Willkie","http://rmc.library.cornell.edu/vote/1940/1940_5.html")
		thirdtermsections[6] = new sectionrecord("6","Willkie Buttons","http://rmc.library.cornell.edu/vote/1940/1940_6.html")
		thirdtermsections[7] = new sectionrecord("7","No Third Term ","http://rmc.library.cornell.edu/vote/1940/1940_7.html")
		thirdtermsections[8] = new sectionrecord("8","Alfred E. Newman","http://rmc.library.cornell.edu/vote/1940/1940_8.html")
		
		
		
		var likingikesections = new Array()
	
		likingikesections.longname = "1952: Liking Ike"

		likingikesections[1] = new sectionrecord("1","The Woman&#8217;s Vote","http://rmc.library.cornell.edu/vote/1952/1952_1.html")
		likingikesections[2] = new sectionrecord("2","Eisenhower Family Postcards","http://rmc.library.cornell.edu/vote/1952/1952_2.html")
		likingikesections[3] = new sectionrecord("3","&#8220;I Like Ike&#8221; Dress &amp; Parasol","http://rmc.library.cornell.edu/vote/1952/1952_3.html")
		likingikesections[4] = new sectionrecord("4","&#8220;I Like Ike&#8221; Bandwagon","http://rmc.library.cornell.edu/vote/1952/1952_4.html")
		likingikesections[5] = new sectionrecord("5","Elephant Hat","http://rmc.library.cornell.edu/vote/1952/1952_5.html")
		likingikesections[6] = new sectionrecord("6","Stevenson Stickers","http://rmc.library.cornell.edu/vote/1952/1952_6.html")
		likingikesections[7] = new sectionrecord("7","Stevenson Literature","http://rmc.library.cornell.edu/vote/1952/1952_7.html")
		likingikesections[8] = new sectionrecord("8","&#8220;I Say Adlai&#8221; Neckties","http://rmc.library.cornell.edu/vote/1952/1952_8.html")
		
		
		
		var televisionsections = new Array()
	
		televisionsections.longname = "1960: Television and the Candidate"

		televisionsections[1] = new sectionrecord("1","Kennedy","http://rmc.library.cornell.edu/vote/1960/1960_1.html")
		televisionsections[2] = new sectionrecord("2","Nixon &amp; Kennedy Buttons","http://rmc.library.cornell.edu/vote/1960/1960_2.html")
		televisionsections[3] = new sectionrecord("3","Candidates' Wives","http://rmc.library.cornell.edu/vote/1960/1960_3.html")
		televisionsections[4] = new sectionrecord("4","TV","http://rmc.library.cornell.edu/vote/1960/1960_4.html")
		
		
		
		var ticketssections = new Array()
	
		ticketssections.longname = "Tickets &amp; Ballots"

		ticketssections[1] = new sectionrecord("1","Early Tickets","http://rmc.library.cornell.edu/vote/tickets/tickets_1.html")
		ticketssections[2] = new sectionrecord("2","1856 Tickets","http://rmc.library.cornell.edu/vote/tickets/tickets_2.html")
		ticketssections[3] = new sectionrecord("3","1860 Tickets","http://rmc.library.cornell.edu/vote/tickets/tickets_3.html")
		ticketssections[4] = new sectionrecord("4","1864 &amp; 1872 Tickets","http://rmc.library.cornell.edu/vote/tickets/tickets_4.html")
		ticketssections[5] = new sectionrecord("5","1900 Voting Machine","http://rmc.library.cornell.edu/vote/tickets/tickets_5.html")
		ticketssections[6] = new sectionrecord("6","Sample Ballot, 1948","http://rmc.library.cornell.edu/vote/tickets/tickets_6.html")
		
		
		
		var thirdpartiessections = new Array()
	
		thirdpartiessections.longname = "Third Party Candidates"

		thirdpartiessections[1] = new sectionrecord("1","Greenback Party","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_1.html")
		thirdpartiessections[2] = new sectionrecord("2","Prohibitionist Party","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_2.html")
		thirdpartiessections[3] = new sectionrecord("3","Socialist Party","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_3.html")
		thirdpartiessections[4] = new sectionrecord("4","Bull Moose [Progressive]","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_4.html")
		thirdpartiessections[5] = new sectionrecord("5","H. Wallace [Progressive]","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_5.html")
		thirdpartiessections[6] = new sectionrecord("6","C. Bass [Progressive]","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_6.html")
		thirdpartiessections[7] = new sectionrecord("7","S. Thurmond [States&#8217; Rights]","http://rmc.library.cornell.edu/vote/thirdparties/thirdparties_7.html")
		
		
		
		var symbolssections = new Array()
	
		symbolssections.longname = "Symbols &amp; Mascots"

		symbolssections[1] = new sectionrecord("1","Abe Axe","http://rmc.library.cornell.edu/vote/symbols/symbols_1.html")
		symbolssections[2] = new sectionrecord("2","Henry Clay Coon","http://rmc.library.cornell.edu/vote/symbols/symbols_2.html")
		symbolssections[3] = new sectionrecord("3","Blaine Frog","http://rmc.library.cornell.edu/vote/symbols/symbols_3.html")
		symbolssections[4] = new sectionrecord("4","Landon Sunflower","http://rmc.library.cornell.edu/vote/symbols/symbols_4.html")
		symbolssections[5] = new sectionrecord("5","Elephant & Donkey","http://rmc.library.cornell.edu/vote/symbols/symbols_5.html")
		symbolssections[6] = new sectionrecord("6","Roosters","http://rmc.library.cornell.edu/vote/symbols/symbols_6.html")
		
		
		
		




	

function showexhibitionheader(currenttopsection){

document.write('<p id="exhibitionnavbar">')

	for (var i = 1; i < topsections.length; i++){
	
		if (topsections[i].shortname == currenttopsection){
		document.write('<span class="selectednavtab"><a href="' + topsections[i].url + '">' + topsections[i].longname + '</a></span>')
		}
		else{
		document.write('<span class="unselectednavtab"><a href="' + topsections[i].url + '">' + topsections[i].longname + '</a></span>')
		}
	
	}

document.write('</p>')

}



function showheader(currenttopsection){

document.write('<p id="navbar">')

	for (var i = 1; i < topsections.length; i++){
	
		if (topsections[i].shortname == currenttopsection){
		document.write('<span class="selectednavtab"><a href="' + topsections[i].url + '">' + topsections[i].longname + '</a></span>')
		}
		else{
		document.write('<span class="unselectednavtab"><a href="' + topsections[i].url + '">' + topsections[i].longname + '</a></span>')
		}
	
	}

document.write('</p>')

}




function showsidebarsections(section, currentsublevel1, currentsublevel2, currentsublevel3){

eval('var sectionlist = ' + section + 'sections')

	for (var i = 1; i < sectionlist.length; i++){
	
	
		if (sectionlist[i].shortname == "-"){
		document.write('</ul><hr size="1" width="84%" color="#E5DBB8" /><ul>')
		}
		
		else{
	
			if (sectionlist[i].shortname == currentsublevel1){
			document.write('<li class="selectedtocitem"><img src="../images/voting_lever_down.gif" align="middle" width="30" height="29" hspace="0" vspace="0" /> <a href="' + sectionlist[i].url + '">' + sectionlist[i].longname + '</a></li>')
			
				if (sectionlist[i].subsectionexists){
				
				document.write('<ul class="sidebartocsublist">')
				
				showsidebarsections(sectionlist[i].shortname, currentsublevel2, currentsublevel3)
				
				document.write('</ul>')
				}
				
			}
			else{
			document.write('<li id="unselectedtocitem"><img src="../images/voting_lever_up.gif" align="middle" width="30" height="18" hspace="0" vspace="2" /> <a href="' + sectionlist[i].url + '">' + sectionlist[i].longname + '</a></li>')
			}
			
		}
	
	}

}




function showsidebarmenu(section, currentsublevel1, currentsublevel2, currentsublevel3){


eval('var sectionlist = ' + section + 'sections')

document.write('<img src="../images/exhibition_hand.gif" width="191" height="74" vspace="5" />')



document.write('<ul style="margin-top: 5px;">')

showsidebarsections(section, currentsublevel1, currentsublevel2, currentsublevel3)
	
document.write('</ul>')


}




function showsplashtoc(state){

if (state != "prelaunch"){


eval('var sectionlist = exhibitionsections')

document.write('<h1>The Exhibition</h1>')
document.write('<img src="images/splashtocruletop.gif" width="350" height="10" />')

document.write('<ul>')


	for (var i = 1; i < sectionlist.length; i++){
	document.write('<li><a href="' + sectionlist[i].url + '">' + sectionlist[i].longname + '</a></li>')		
	}
	
document.write('</ul>')
document.write('<img src="images/splashtocrulebottom.gif" width="350" height="10" />')


}


}




function showfooter(){

document.write('<a href="http://campusgw.library.cornell.edu/"><img class="imageinsertleft" src="http://rmc.library.cornell.edu/vote/images/CUL_small_blk_right_blue.gif" width="115" height="79" alt="Cornell University Library Gateway" /></a>')
//document.write('<a href="http://www.cornell.edu/"><img class="imageinsertright" src="http://rmc.library.cornell.edu/vote/images/culogo.gif" width="65" height="65" alt="Cornell University" /></a>')
document.write('<div style="text-align: center; padding-top: 10px; float: right;" <a href="http://www.coolsiteoftheday.com/"><img src="http://www.coolsiteoftheday.com/coolsiteoftheday_144_82.gif" style="padding-bottom: 5px;" alt="Cool Site of the Day Award" border="0" /></a><br/><span style="font-size: 11px;">09/13/2006</span></div>')
document.write('&copy; 2004 <a href="http://rmc.library.cornell.edu/">Division of Rare &amp; Manuscript Collections</a>.<br/>')
document.write('<p>This exhibition is made possible through the generous support of the Arnold B. &rsquo;44 &amp; Gloria Tofias Fund and the Stephen C. &amp; Karen L. Parker Fund.<br/>')
document.write('For more information about the Cornell University Collection of Political Americana, please visit the <a href=" http://cidc.library.cornell.edu/political/">project web site</a>.<br/>')
document.write('For reference questions, please complete our <a href="http://rmc.library.cornell.edu/services/reference.html">reference form</a>.')
document.write(' For questions or comments about this website, send E-mail to <a href="mailto:rmcweb@cornell.edu">rmcweb@cornell.edu</a>.</p>')

}




var newWindow


function makeViewerWindow(imagename) {
	if (!newWindow || newWindow.closed) {
		
		newWindow = window.open("","Viewer","status,height=700,width=600,top=0,left=0,scrollbars=yes,resizable=yes")
	}
	
	if (!newWindow.opener) {
		newWindow.opener = window
	}
	
	// assemble content for new window
	var newContent = "<html><head><title>Image Viewer</title><link href='../css/viewer.css' rel='stylesheet' type='text/css'></head>"
	newContent += "<body><table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td class='viewer' align='center' valign='center'><img src='../images/570pxw/"
	newContent += imagename
	newContent += "' vspace='10'><br><a href='javascript:window.close()'>Close this window</a><br>&nbsp;<br></td></tr><tr><td class='viewerbottom'>&nbsp;</td></tr></table></body></html>"
	
	// write HTML to new window document
	newWindow.document.write(newContent)
	newWindow.document.close() // close layout stream
	
	newWindow.focus()
	
}

