<!--

// Version 3.7

// browser sniffer
userAgent = navigator.userAgent;
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
var isMac=0;var saf=0;
ns = (bName == "Netscape");
ns3 = (bName == "Netscape" && bVer == 3);
ns4 = (bName == "Netscape" && bVer == 4);
ns6 = (bName == "Netscape" && bVer >= 5);
ie3 = (bName == "Microsoft Internet Explorer" && bVer == 3);
ie = (bName == "Microsoft Internet Explorer" && bVer >= 4);
if(userAgent.indexOf('Safari')!= -1){saf = true;}
if(userAgent.indexOf('Mac')!= -1){isMac = true;}

(ie3 || ns3 || ns4)?location.replace('/site-templates/needmore.html'):0;


// name url
var url = top.parent.location.href;


// assign false variables
var slideshow = 0;
var results = 0;
var monograph = 0;
var newspaper = 0;
var doc = 0;
var object = 0;
var postcard = 0;
var item_viewer = 0;
var popup = 0;
var favorites = 0;
var compare = 0;
var browseit = 0;
var monopag = 0;
var grid_style = 0;
var titles_style = 0;
var thumbnail_style = 0;
var bibliographic_style = 0;
var fav_view = 0;
var fav = '';
var st = '';
var section = '';
var section_title = 'Search Results';
var search_action = 'javascript:void(0)';
var helppage = '';
var isAdmin = '';
var image_cell = '';
var grid_status_color = (button_font_color);
var titles_status_color = (button_font_color);
var thumbnails_status_color = (button_font_color);
var bibliographic_status_color = (button_font_color);
var previous_status_color = (button_font_color);
var next_status_color = (button_font_color);
if(top.name == 'popup'){var popup = 1;}
if(parent.file == 'document_viewer'){file = 'document_viewer';}
if(parent.file == 'monograph_viewer'){file = 'monograph_viewer';}
if(parent.file == 'advanced_search'){file = 'advanced_search';}
if((parent.header1)&&(parent.header1.location.href.indexOf('headerpostcard')!= -1)){file = 'postcard_viewer'}
if((parent.header1)&&(parent.header1.location.href.indexOf('headerpicturecube')!= -1)){file = 'cube_viewer'}
if((top.parent.header1)&&(top.parent.header1.location.href.indexOf('headernewspaper')!= -1)){file = 'newspaper_viewer'}
if(url.indexOf('/cgi-bin/admin/')!= -1){var isAdmin = 'admin/';}

if(parent.file == 'slide_show'){
var slideshow = 1;
page_background_color = slideshow_page_background_color;
image_background_color = slideshow_image_background_color;
table_cellpadding = slideshow_table_cellpadding;
table_cellspacing = slideshow_table_cellspacing;
maintext_color = slideshow_maintext_color;
link_color = slideshow_link_color;
subnav_color = slideshow_subnav_color;
inner_table_bordercolor = slideshow_inner_table_bordercolor;
button_font_color = slideshow_button_font_color;
button_background_color = slideshow_button_background_color;
form_background_color = slideshow_form_background_color;
form_text_color = slideshow_form_text_color;
outer_table_bordercolor = slideshow_outer_table_bordercolor;
}

if(searchbox == null){var searchbox = 1;}
if(mono_searchbox == null){var mono_searchbox = 1;}

if(parent.back_to_search_url == null){var back_to_search_url = '';}
if(file == null){var file = '';}
if(con_message == null){var con_message = 'none';}
if(comp_select == null){var comp_select = comp_select}

if(grid_res == null){var grid_res = '';}
if(titl_res == null){var titl_res = '';}
if(thum_res == null){var thum_res = '';}
if(bibl_res == null){var bibl_res = '';}
if(prev_res == null){var prev_res = '';}
if(next_res == null){var next_res = '';}
if(BrowseItems == null){var BrowseItems = '';}

// page header variables for functioning buttons
if(grid_res != ''){var gogrid = 'javascrip:top.location.href = (grid_res)';}
else{var gogrid = 'javascrip:void(0)';var grid_status_color = (notthere_font_color)}

if(thum_res != ''){var gothum = 'javascrip:top.location.href = (thum_res)';}
else{var gothum = 'javascrip:void(0)';var thumbnails_status_color = (notthere_font_color);}

if(titl_res != ''){var gotitl = 'javascrip:top.location.href = (titl_res)';}
else{var gotitl = 'javascrip:void(0)';var titles_status_color = (notthere_font_color);}

if(bibl_res != ''){var gobibl = 'javascrip:top.location.href = (bibl_res)';}
else{var gobibl = 'javascrip:void(0)';var bibliographic_status_color = (notthere_font_color);}

if(prev_res != ''){var goprev = 'javascrip:top.location.href = (prev_res)';}
else{var goprev = 'javascrip:void(0)';previous_status_color = (notthere_font_color);}

if(next_res != ''){var gonext = 'javascrip:top.location.href = (next_res)';}
else{var gonext = 'javascrip:void(0)';next_status_color = (notthere_font_color);}



// determine page to display correct menu and assorted variables
switch(file){

	case 'index':
	case 'com':
		
		var file = 'home';
		var section_title = 'Home Page';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
		var homepage = 1;
		
	break;
	
	case 'advanced_search':
	
		var helppage = '#advanced_search';
		var section_title = 'Advanced Search';
		
	break;

	case 'browse_grid_results':

		var section = 'results';
		var browseit = 1;
		var results = 1;
		var fav = 'browse_';
		var image_table_align = 'left';
		var section_title = 'Browse Results';
		var search_results = (browse_results);
		var search_results_line1 = (browse_results_line1);
		var search_results_line2 = (browse_results_line2);
		var helppage = '#browse';
		grid_status_color = (status_font_color);

	break;

	case 'browse_titles_results':

		var section = 'results';
		var browseit = 1;
		var results = 1;
		var fav = 'browse_';
		var section_title = 'Browse Results';
		var search_results = (browse_results);
		var search_results_line1 = (browse_results_line1);
		var search_results_line2 = (browse_results_line2);
		var helppage = '#browse';
		titles_status_color = (status_font_color);

	break;

	case 'browse_thumbnail_results':

		var section = 'results';
		var browseit = 1;
		var results = 1;
		var fav = 'browse_';
		var section_title = 'Browse Results';
		var search_results = (browse_results);
		var search_results_line1 = (browse_results_line1);
		var search_results_line2 = (browse_results_line2);
		var helppage = '#browse';
		thumbnails_status_color = (status_font_color);
		var image_cell = '20%';

	break;

	case 'browse_bibliographic_results':

		var section = 'results';
		var browseit = 1;
		var results = 1;
		var fav = 'browse_';
		var section_title = 'Browse Results';
		var search_results = (browse_results);
		var search_results_line1 = (browse_results_line1);
		var search_results_line2 = (browse_results_line2);
		var helppage = '#browse';
		bibliographic_status_color = (status_font_color);

	break;
	
	case 'grid_results':
	
		var section = 'results';
		var results = 1;
		var search = 'search again';
		var helppage = '#search_results';
		var image_table_align = 'left';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
		grid_status_color = (status_font_color);
	
	break;

	case 'titles_results':
	
		var section = 'results';
		var results = 1;
		var search = 'search again';
		var helppage = '#search_results';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
		titles_status_color = (status_font_color);
		
	break;

	case 'thumbnail_results':
	
		var section = 'results';
		var results = 1;
		var search = 'search again';
		var helppage = '#search_results';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
		thumbnails_status_color = (status_font_color);
		var image_cell = '20%';
		
	break;

	case 'bibliographic_results':
	
		var section = 'results';
		var results = 1;
		var search = 'search again';
		var helppage = '#search_results';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
		bibliographic_status_color = (status_font_color);
		
	break;

	case 'my_favorites_grid_results':
	
		var fav = 'my_favorites_'; 
		var header_title = (my_favorites_title);
		var navstrip_background_color = (my_fav_navstrip_background_color);
		var favorites = 1;
		var section = 'favorites';
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		grid_status_color = (status_font_color);
	
	break;

	case 'my_favorites_titles_results':

		var fav = 'my_favorites_'; 
		var header_title = (my_favorites_title);
		var navstrip_background_color = (my_fav_navstrip_background_color);
		var favorites = 1;
		var section = 'favorites';
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		titles_status_color = (status_font_color);
		
	break;

	case 'my_favorites_thumbnail_results':
	
		var fav = 'my_favorites_'; 
		var header_title = (my_favorites_title);
		var navstrip_background_color = (my_fav_navstrip_background_color);
		var favorites = 1;
		var section = 'favorites';
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		thumbnails_status_color = (status_font_color);
		var image_cell = '20%';
		
	break;

	case 'my_favorites_bibliographic_results':
	
		var fav = 'my_favorites_'; 
		var header_title = (my_favorites_title);
		var navstrip_background_color = (my_fav_navstrip_background_color);
		var favorites = 1;
		var section = 'favorites';
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		bibliographic_status_color = (status_font_color);
		
	break;
	
	case 'my_favorites_empty_results':
	
		var fav_view = 0;
		var section = 'fav_view';
		var header_title = (my_favorites_title);
		var header_title = (my_favorites_title);
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		var navstrip_background_color = (my_fav_navstrip_background_color);
		
	break;

	case 'publish_my_favorites':
	
		var header_title = (my_favorites_title);
		var section_title = 'Publish My Favorites';
		var helppage = '#my_favorites';
		var navstrip_background_color = (my_fav_navstrip_background_color);
		
	break;

	case 'my_favorites_item_viewer':
	
		var fav_view = 1;
		var section = 'fav_view';
		var header_title = (my_favorites_title);
		var section_title = 'My Favorites';
		var helppage = '#my_favorites';
		var navstrip_background_color = (my_fav_navstrip_background_color);
		
	break;

	case 'monograph_viewer':
	
		var section = 'doc';
		var section_title = 'Monograph Viewer';
		var monograph = 1;
		var helppage = '#compound_object';
	
	break;

	case 'newspaper_viewer':
	
		var section = 'doc';
		var section_title = 'Monograph Viewer';
		var monograph = 1;
		var newspaper = 1;
		var helppage = '#compound_object';
	
	break;
	
	case 'document_viewer':
	
		var section = 'doc';
		var section_title = 'Document Viewer';
		var doc = 1;
		var helppage = '#compound_object';
		var form_action = '/cgi-bin/docmenu.exe';
		var search_action = 'javascript:return SearchDoc()';
	
	break;

	case 'cube_viewer':
	
		var section = 'doc';
		var section_title = 'Object Viewer';
		var doc = 1;
		var cube = 1;
		var add_doc_favorites = add_item_favorites;
		var add_page_favorites = add_side_favorites;
		var document_description = item_description;
		var prev = prev_side;
		var next = next_side;
		var page_descr = side_description;
		var helppage = '#compound_object';
	
	break;
	
	case 'postcard_viewer':
	
		var section = 'doc';
		var section_title = 'Object Viewer';
		var doc = 1;
		var postcard = 1;
		var add_doc_favorites = add_item_favorites;
		var add_page_favorites = add_side_favorites;
		var document_description = item_description;
		var page_descr = side_description;
		var helppage = '#compound_object';
	
	break;
	
	case 'object_viewer':
	
		var section = 'object';
		var section_title = 'Object Viewer';
		var object = 1;
		var helppage = '#compound_object';
	
	break;
	
	case 'item_viewer':
	
		var item_view = 1;
		var section = 'item_view';
		var section_title = 'Item Viewer';
	
	break;

	
	case 'compare_viewer':
	
		var compare = 1;
		var section_title = 'Compare Viewer';
	
	break;

	case 'help':
	
		var section_title = 'Help';
		var form_action = '/cgi-bin/queryresults.exe';
		var search_action = 'javascript:return SearchAll()';
	
	break;

	case 'preferences':
	
		var section_title = 'Search Preferences';
		var helppage = '#advanced_search';
	
	break;

	case 'select_collections':
	
		var section_title = 'Search Select Collections';
		var helppage = '#advanced_search';
	
	break;

	case 'about':
	
		var section_title = 'About';
	
	break;
	
	case 'side_x_side':
	
		var section_title = 'Page and Text Viewer';
	
	break;
	
/* added by DS 08-10-2004 */
	case 'collections':
	
		var section_title = 'Collections';
	
	break;

	case 'funding':
	
		var section_title = 'Funding Sources';
	
	break;

	case 'digitization':
	
		var section_title = 'Digitization Resources';
	
	break;

	case 'teaching':
	
		var section_title = 'Teaching Resources';
	
	break;
/* end DS */
	
	}

(email_address != '')?email_address = '&nbsp; <a class="navstrip" href="mailto:'+(email_address)+'">'+(contact_us)+'</a> &nbsp;|':0;

/*####################### style sheet ######################## */



// global style sheet
if(cols == null) {var cols = 6;}
if(rows == null) {var rows = 3;}

(inner_table_border == '1')?hrrows = 0:0;
(hrrows == '0')?hrrows = 0:0;
(hrrows == '1')?hrrows = 1:0;

((ie)||(saf))?search_box_size = 24:search_box_size = 16;
((ie)||(saf))?text_box_size = 36:text_box_size = 30;

mono_frame_rows = 0;

if(parent.mono_searchbox == 0){
mono_frame_rows = 30;
}
(ie)?frame_rows = (98-mono_frame_rows):frame_rows = (102-mono_frame_rows);
(isMac&&ie)?frame_rows = (96-mono_frame_rows):0;
(saf || ns6)?frame_rows = (110-mono_frame_rows):0;

(ie)?frame_cols = 214:frame_cols = 210;
(isMac&&ie)?frame_cols = 214:0;
(saf)?frame_cols = (220):0;
((monograph)||(doc))?search_box_size = 18:0;
((monograph)||(doc))?enter_search = 'search terms':enter_search = 'enter search terms';
((ie)||(saf))?nav_font_size = nav_font_size:nav_font_size = nav_font_size+1;

function style(){
var style = '<style type="text/css">';
style += '<!-- ';

style += 'body {';
	style += 'background:'+(page_background_color)+';';
	style += '}';

style += '.headertitle{';
	style += 'color:'+(header_title_font_color)+';';
	style += 'font-family:'+(header_title_font_type)+';'; 
	style += 'font-size:'+(header_title_font_size)+'px;';
	style += 'font-weight:'+(header_title_font_weight)+';';
	style += '}';
	
style += '.maintext{';
	style += 'color:'+(maintext_color)+';'; 
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+(maintext_size)+'px;';
	style += '}';
	
style += '.item_viewer_text{';
	style += 'color:'+(item_viewer_text_color)+';';
	style += 'font-family:'+(item_viewer_text_type)+';'; 
	style += 'font-size:'+(item_viewer_text_size)+'px;';
	style += '}';

style += '.red{';
	style += 'color:'+(red_color)+';';
	style += '}';
	
style += '.smalltext{';
	style += 'color:'+(maintext_color)+';'; 
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+((maintext_size)-2)+'px;';
	style += '}';

style += '.restext{';
	style += 'color:'+(resultstext_color)+';'; 
	style += 'font-family:'+(resultstext_type)+';';
	style += 'font-size:'+(resultstext_size)+'px;';
	style += '}';

style += '.gotext{';
	style += 'color:'+(gotext_color)+';'; 
	style += 'font-family:'+(gotext_type)+';';
	style += 'font-size:'+(gotext_size)+'px;';
	style += '}';

style += '.item_viewer_text{';
	style += 'color:'+(item_viewer_text_color)+';';
	style += 'font-family:'+(item_viewer_text_type)+';'; 
	style += 'font-size:'+(item_viewer_text_size)+'px;';
	style += '}';
	
style += '.red{';
	style += 'color:'+(red_color)+';';
	style += '}';
	
style += 'a{';
	style += 'color:'+(link_color)+';';
	style += 'text-decoration:'+(link_underline)+';';
	style += '}';
	
style += 'a:hover{';
	style += 'color:'+(link_hover_color)+';'; 
	style += 'text-decoration:'+(hover_link_underline)+';';
	style += '}';
	
style += 'hr{';
	style += 'color:'+(horizontal_rule_color)+';';
	style += '}';
		
style += '.submenu{';
	style += 'color:'+(maintext_color)+';';
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+((maintext_size)-1)+'px;';
	style += '}';
	
style += '.navstrip{';
	style += 'color:'+(nav_font_color)+';';
	style += 'font-family:'+(nav_font_type)+';';
	style += 'font-size:'+(nav_font_size)+'px;';
	style += 'font-weight:'+(nav_font_weight)+';';
	style += '}';
	
style += '.asterix{';
	style += 'color:#ff0000;';
	style += 'font-family:'+(nav_font_type)+';';
	style += 'font-size:11px;';
	style += 'font-weight:bold;';
	style += '}';

	
// inner table styles
style += '.tdtext{';
	style += 'text-align:'+(text_table_align)+';';
	style += 'vertical-align:'+(text_table_valign)+';';
	style += '}';
	
style += '.tdviewtext{';
	style += 'text-align:'+(item_viewer_text_align)+';';
	style += 'vertical-align:'+(text_table_valign)+';';
	style += '}';
	
style += '.tdcheck{';
	style += 'text-align:'+(checkbox_table_align)+';';
	style += 'vertical-align:'+(checkbox_table_valign)+';';
	style += '}';
	
style += '.tdimage{';
	style += 'text-align:'+(image_table_align)+';';
	style += 'vertical-align:'+(image_table_valign)+';';
	style += 'border:'+(image_border)+'px '+(image_border_style)+';';
	style += 'width:'+(image_cell)+';';
	style += 'background-color:'+(image_background_color)+';';
	style += '}';

style += '.thumbnail{';
	style += 'color:'+(resultstext_color)+';'; 
	style += 'font-family:'+(thumbnail_type)+';'; 
	style += 'font-size:'+(thumbnail_size)+'px;';
	style += '}';
	
style += 'a.thumbnail{';
	style += 'color:'+(thumbnail_color)+';';
	style += 'font-family:'+(thumbnail_type)+';';
	style += 'font-size:'+(thumbnail_size)+'px;';
	style += 'text-decoration:'+(link_underline)+';';
	style += '}';
	
	
// form styles
style += 'input{';
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+((maintext_size)-1)+'px;';
	style += 'color:'+(form_text_color)+';';
	style += 'background-color:'+(table_background_color)+';';
	style += '}';
	
style += 'input.text{';
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+((maintext_size)-1)+'px;';
	style += 'background-color:'+(form_background_color)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(form_text_color)+';';
	style += 'BORDER-TOP-STYLE:solid;';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:solid;';
	style += 'BORDER-LEFT-STYLE:solid;';
	style += 'BORDER-RIGHT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:solid;';
	style += '}';
	
style += 'input.picker{';
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+(maintext_size)+'px;';
	style += 'background-color:'+(page_background_color)+';';
	style += 'BORDER-LEFT-COLOR:'+(page_background_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(page_background_color) +';';
	style += 'COLOR:'+(maintext_color)+';';
	style += 'BORDER-TOP-STYLE:none;';
	style += 'BORDER-TOP-COLOR:'+(page_background_color) +';';
	style += 'BORDER-RIGHT-STYLE:none;';
	style += 'BORDER-LEFT-STYLE:none;';
	style += 'BORDER-RIGHT-COLOR:'+(page_background_color) +';';
	style += 'BORDER-BOTTOM-STYLE:none;';
	style += '}';

style += 'input.buttons{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(button_font_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
	
style += 'input.searchbutton{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(button_font_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(search_button_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
	
style += 'select{';
	style += 'font-family:'+(maintext_type)+';';
	style += 'font-size:'+((maintext_size)-1)+'px;';
	style += 'color:'+(form_text_color)+';';
	style += 'background-color:'+(form_background_color)+';';
	style += '}';
	
style += 'input.stgrid{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(grid_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
	
style += 'input.stthumbnails{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(thumbnails_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
	
style += 'input.sttitles{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(titles_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
	
style += 'input.stbibliographic{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(bibliographic_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';

style += 'input.stprevious{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(previous_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';

style += 'input.stnext{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:'+(button_font_weight)+';';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color) +';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color) +';';
	style += 'COLOR:'+(next_status_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color) +';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+ (button_border_color) +';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';

style += '.item{';
	style += 'line-height:14px;';
	style += 'color:'+(dyna_menu_color)+';';
	style += 'font-family:'+(dyna_menu_type)+';';
	style += 'font-size:'+(dyna_menu_size)+'px;';
	style += 'font-weight:'+(dyna_menu_font_weight)+';';
	style += '}';

style += '.ul{';
	style += 'margin-left:5px';
	style += '}';

style += '#adfav{';
	style += 'color:'+(notthere_font_color)+';';
	style += '}';
	
style += 'input.second{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:bold;';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color)+';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color)+';';
	style += 'COLOR:'+(status_font_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color)+';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+(button_border_color)+';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:text;';
	style += '}';
	
style += 'input.first{';
	style += 'font-family:'+(button_font_type)+';';
	style += 'font-size:'+(button_font_size)+'px;';
	style += 'font-weight:bold;';
	style += 'BORDER-LEFT-COLOR:'+(button_border_color)+';';
	style += 'BORDER-BOTTOM-COLOR:'+(button_border_color)+';';
	style += 'COLOR:'+(button_font_color)+';';
	style += 'BORDER-TOP-STYLE:'+(button_border_style)+';';
	style += 'BORDER-TOP-COLOR:'+(button_border_color)+';';
	style += 'BORDER-RIGHT-STYLE:'+(button_border_style)+';';
	style += 'BORDER-LEFT-STYLE:'+(button_border_style)+';';
	style += 'BACKGROUND-COLOR:'+(button_background_color)+';';
	style += 'BORDER-RIGHT-COLOR:'+(button_border_color)+';';
	style += 'BORDER-BOTTOM-STYLE:'+(button_border_style)+';';
	style += 'cursor:hand;';
	style += '}';
			
style += '//--> ';
style += '</style>';
document.write(style);}
style();


/*####################### page layout ######################## */



// parse out variables from url string for form functions
var TopSearchString = unescape(top.location.search);

CisoString = replacetext(TopSearchString, '%2F', '/');

tot = countInstances(CisoString, 'CISOROOT'); 

var cison = new Array();

for(i=1;i<tot+1;i++){

firststring = CisoString.indexOf('CISOROOT'+i);

newstring = CisoString.substring(firststring)

cisoroot = newstring.indexOf('CISOROOT'+i);


camp = newstring.indexOf('&C');

sROOT = newstring.substring(cisoroot+10,camp);

sCISOROOT = replacetext(sROOT, '=', '');

cison[i] = new Array(sCISOROOT);
}


cisoroot = TopSearchString.lastIndexOf('CISOROOT') + 1;
amp = TopSearchString.indexOf('&');
root = TopSearchString.substring(cisoroot+8,amp);
var TopRoot = replacetext(root, '%2F', '/');

TopShortString = TopSearchString.substring(cisoroot+9+root.length);

	if(TopShortString.indexOf('&')!= -1){
	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;
	amp = TopShortString.indexOf('&');
	var TopOptr = TopShortString.substring(cisoptr+7,amp);
	}

	if(TopShortString.indexOf('&')== -1){
	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;
	var TopOptr = TopShortString.substring(cisoptr+7);
	}

	if(TopSearchString.indexOf('CISOOP')!= -1){
	cisoop = TopSearchString.indexOf('CISOOP')+ 1;
	amp5 = TopSearchString.substring(cisoop);
	amp4 = amp5.indexOf('&')+cisoop;
	var TopSoop = TopSearchString.substring(cisoop+6,amp4);
	}
	else{
	var TopSoop = 'all';
	}


// search all form
var searchform = '';
searchform += '<table border="0" cellpadding="0" cellspacing="0">';
searchform += '<form name="submenuform" action="'+(form_action)+'" onSubmit="'+(search_action)+'">';

if((file == 'help')||(homepage)){
searchform += '<tr>';
searchform += '<td align="right" valign="bottom" nowrap><span class="maintext">';
searchform += '<b>'+(search_collections)+':</b>';
searchform += '</span></td>';
searchform += '<td align="right" valign="bottom">&nbsp;';
searchform += '</td>';
searchform += '</tr>';
}
else{
searchform += '';
}

searchform += '<tr>';
searchform += '<td align="right" valign="bottom">';

if(results){
searchform += '<input name="CISOFIELD1" type="hidden" value="CISOSEARCHALL">';
for(i=1;i<tot+1;i++){
searchform += '<input type="hidden" name="CISOROOT'+(i)+'" value="'+cison[i]+'">';}
if((TopSoop.indexOf('&')!= -1)||(TopSoop == '')){TopSoop='all'}
searchform += '<input name="CISOOP" type="hidden" value="'+(TopSoop)+'">';
}

else{
searchform += '<input name="CISOROOT" type="hidden" value="all">';
searchform += '<input name="CISOFIELD1" type="hidden" value="CISOSEARCHALL">';
}

searchform += '<input name="CISOBOX1" type="text" size="'+(search_box_size)+'" value="'+(enter_search)+'" onfocus="clearDefault(this)" class="text">';
searchform += '</td>';
searchform += '<td align="left" valign="middle" nowrap><span class="maintext">';
searchform += '&gt;<input type="submit" value="'+(search)+'" class="searchbutton">';
searchform += '</span></td>';
searchform += '</tr>';
searchform += '</form>';
searchform += '</table>';





// document search form
var docsearchform = '';
docsearchform += '<table border="0" cellpadding="0" cellspacing="0">';
docsearchform += '<form name="docform" action="'+(form_action)+'" onSubmit="'+(search_action)+'">';
docsearchform += '<tr>';
docsearchform += '<td align="left" valign="bottom">';

docsearchform += '<input name="CISOROOT" type="hidden" value="'+(TopRoot)+'">';
docsearchform += '<input name="CISOPTR" type="hidden" value="'+(TopOptr)+'">';
docsearchform += '<input name="CISOSEARCH" type="text" size="'+(search_box_size)+'" value="'+(enter_search)+'" onfocus="clearDefault(this)" class="text">';
docsearchform += '</td>';
docsearchform += '<td align="left" valign="middle" nowrap><span class="maintext">';
docsearchform += '&gt;<input type="submit" value="'+(search)+'" class="searchbutton">';
docsearchform += '</span></td>';
docsearchform += '</tr>';
docsearchform += '</form>';
docsearchform += '</table>';



// monograph search form
var monosearchform = '';
monosearchform += '<table border="0" cellpadding="0" cellspacing="0">';
monosearchform += '<form name="monoform" onSubmit="javascript:return SearchMono();">';
monosearchform += '<tr>';
monosearchform += '<td align="left" valign="bottom">';

monosearchform += '<input name="CISOROOT" type="hidden" value="'+(TopRoot)+'">';
monosearchform += '<input name="CISOPTR" type="hidden" value="'+(TopOptr)+'">';
monosearchform += '<input name="CISOSEARCH" type="text" size="'+(search_box_size)+'" value="'+(enter_search)+'" onfocus="clearDefault(this)" class="text">';
monosearchform += '</td>';
monosearchform += '<td align="left" valign="middle" nowrap><span class="maintext">';
monosearchform += '&gt;<input type="submit" value="'+(search)+'" class="searchbutton">';
monosearchform += '</span></td>';
monosearchform += '</tr>';
monosearchform += '</form>';
monosearchform += '</table>';


//browsepage
var browsepage = '<form name="browselist" action="/cgi-bin/browseresults.exe">';
browsepage += '<td align="left" valign="middle" style="border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap width="6%"><span class="submenu">';
browsepage += (select_collection)+': ';
browsepage += '</span></td>';
browsepage += '<td align="left" valign="middle" style="border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">&nbsp;';
browsepage += '&nbsp;<select name="CISOROOT" onchange="submit()">';

if(browseit){
browsepage += '<option value="'+(BrowseItems[0][0])+'" selected>';
browsepage += (BrowseItems[0][1]);}
	
for(j=1;j<BrowseItems.length;j++){
browsepage += '<option value="'+(BrowseItems[j][0])+'">';
browsepage += (BrowseItems[j][1]);}

browsepage += '<option value="">------------------------';
browsepage += '</select>';
browsepage += '</span></td>';
browsepage += '<td align="left" valign="middle" style="border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';">';
browsepage += '&nbsp;</td></form>';

// document search
var docsearch = '';

	if(searchbox == 0){
	docsearch += '';}

	else if(parent.mono_searchbox == 0){
	docsearch += '';}

	else{
docsearch +='<tr>';
docsearch +='<td colspan="2" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-left: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';">';
docsearch +='<span class="maintext">'+(search_this_document)+':<br>';

		if((monograph)&&(newspaper)){
		docsearch += (monosearchform);
		}

		else if(monograph){
		docsearch += (monosearchform);
		}

		else if(doc){
		docsearch += (docsearchform);
		}

		else{
		docsearch += '';
		}

docsearch +='</span></td>';
docsearch +='</tr>';
docsearch +='<tr>';
docsearch +='<td bgcolor="'+(page_background_color)+'">';

	if(saf || ns6){docsearch += '';}
	
	else{
	docsearch += '<img src="/images/spacer.gif" width="1" height="1" border="0">';
	}
	
docsearch +='</td>';
docsearch +='</tr>';
	}


// display correct menu
var submenu = '';
var botmenu = '';


	function document_leftmenu(){
	var leftmenu = '';
	leftmenu += '<table border="0" cellpadding="'+(page_margins)+'" cellspacing="0" width="'+((frame_cols)-10)+'">';
	leftmenu += '<tr>';
	leftmenu += '<td align="left" valign="top">';
	leftmenu += '<span class="restext">';
	leftmenu += '<table cellpadding="1" cellspacing="0" border="0" bgcolor="'+(subnav_color)+'" width="100%">';
	leftmenu += (docsearch);
	leftmenu += '<tr>';
	leftmenu += '<td align="center" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
	leftmenu += '<span class="restext">';
	leftmenu += '<input type="button" value="'+(add_doc_favorites)+'" onClick="StoreFavorites()" class="buttons">';
	leftmenu += '</span></td>';
	leftmenu += '</tr>';
	leftmenu += '<tr>';
	leftmenu += '<td align="center" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-left: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
	leftmenu += '<span class="restext">';
	leftmenu += '<span id="pagetofav" style="visibility:visible">';
	leftmenu += '<input type="button" value="'+(add_page_favorites)+'" onClick="StorePageFavorites()" class="buttons">';
	leftmenu += '</span>';
	leftmenu += '</span></td>';
	leftmenu += '</tr>';
	
	if(postcard){
	leftmenu += '';
	}
	
	else{
	leftmenu += '<tr>';
	leftmenu += '<td bgcolor="'+(page_background_color)+'">';
	
	if(saf || ns6){leftmenu += '';}  	
	
	else{leftmenu += '<img src="/images/spacer.gif" width="1" height="1" border="0" alt="">';}
	leftmenu += '</td>';
	leftmenu += '</tr>';
	leftmenu += '<tr>';
	leftmenu += '<td align="center" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-left: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
	leftmenu += '<span class="maintext">';
	
	if(monograph){
		if(parent.left.monopag){
			if((!isMac)&&(ns6)){
			leftmenu += '&nbsp;';	
			}
			else{
			leftmenu += '<a href="javascript:parent.left.dow();">'+(prev)+'</a>&nbsp;|&nbsp;';
			leftmenu += '<a href="javascript:parent.left.up();">'+(next)+'</a>';	
			}
		}
		else{
			if((ie&&isMac)||(!isMac)&&(ns6)){
			leftmenu += '&nbsp;';	
			}
			else{
			leftmenu += '<a href="javascript:parent.dow();">'+(prev)+'</a>&nbsp;|&nbsp;';
			leftmenu += '<a href="javascript:parent.up();">'+(next)+'</a>';	
			}
		}
	}
	else{
		leftmenu += '<a href="javascript:dow();">'+(prev)+'</a>&nbsp;|&nbsp;';
		leftmenu += '<a href="javascript:up();">'+(next)+'</a>';
	}
	
	leftmenu += '</span></td>';
	leftmenu += '</tr>';
	}
	
	leftmenu += '<tr>';
	leftmenu += '<td bgcolor="'+(page_background_color)+'">';
	leftmenu += '<img src="/images/spacer.gif" width="1" height="1" border="0">';
	leftmenu += '</td>';
	leftmenu += '</tr>';
	leftmenu += '</table>';
	leftmenu += '</span></td>';
	leftmenu += '</tr>';
	leftmenu += '</table>';
	document.write(leftmenu);}





switch(section){

	case 'monograph':
	
	submenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	submenu += '<tr>';
	submenu += '<td colspan="2" bgcolor="'+(page_background_color)+'">';
	submenu += '<img src="/images/spacer.gif" width="1" height="2" border="0">';
	submenu += '</td>';
	submenu += '</tr>';
	submenu += '<tr>';
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap>';
	submenu += '<span class="submenu">';
	submenu += '<input type="button" value="'+(back_to_search_results)+'" onClick="parent.location.href=\''+(parent.back_to_search_url)+'\'" class="buttons">';
	submenu += '</span></td>';
	submenu += '<td align="right" valign="middle" style="border-right: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap>';
	submenu += '<span class="submenu">';
	submenu += (viewby)+': ';
	submenu += '<input type="button" value=" '+(document_description)+' " onClick="DocDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(page_descr)+'" onClick="PageDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<span id="pageviews" style="visibility:visible">';
	submenu += '<input type="button" value="'+(sidexside)+'" class="buttons" onclick="PageText()">';
	submenu += '</span>';
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';

	break;
		
	case 'doc':

	submenu = '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	submenu += '<tr>';
	submenu += '<td colspan="2" bgcolor="'+(page_background_color)+'">';
	submenu += '<img src="/images/spacer.gif" width="1" height="2" border="0">';
	submenu += '</td>';
	submenu += '</tr>';
	submenu += '<tr>';
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	submenu += '<input type="button" value="'+(back_to_search_results)+'" onClick="parent.location.href=\''+(parent.back_to_search_url)+'\'" class="buttons">';
	submenu += '</span></td>';
	submenu += '<td align="right" valign="middle" style="border-right: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap>';
	submenu += '<span class="submenu">';
	submenu += (viewby)+': ';
	submenu += '<input type="button" value=" '+(document_description)+' " onClick="DocDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(page_descr)+'" onClick="PageDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	
	if(postcard){
	submenu += '<input type="button" value="'+(both_views)+'" onClick="BothViews()" class="buttons">';
submenu += '<span id="pageviews" style="visibility:visible"></span>';
	}
	else{
	submenu += '<span id="pageviews" style="visibility:visible">';
	submenu += '<input type="button" value="'+(sidexside)+'" onClick="PageText()" class="buttons">';
	submenu += '</span>';
	}
	
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';

	break;
	
	case 'object':

	submenu = '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	submenu += '<tr>';
	submenu += '<td colspan="2" bgcolor="'+(page_background_color)+'">';
	submenu += '<img src="/images/spacer.gif" width="1" height="2" border="0">';
	submenu += '</td>';
	submenu += '</tr>';
	submenu += '<tr>';
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	submenu += '<input type="button" value="'+(back_to_search_results)+'" onClick="parent.location.href=\''+(parent.back_to_search_url)+'\'" class="buttons">';
	submenu += '</span></td>';
	submenu += '<td align="right" valign="middle" style="border-right: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap>';
	submenu += '<span class="submenu">';
	submenu += (viewby)+': ';
	submenu += '<input type="button" value=" '+(document_description)+' " onClick="DocDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(page_descr)+'" onClick="PageDescr()" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(both_views)+'" onClick="BothViews()" class="buttons">';
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';

	break;

	case 'item_view':
	
	submenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	submenu += '<tr>';
	submenu += '<td bgcolor="'+(page_background_color)+'">';
	submenu += '<img src="/images/spacer.gif" width="1" height="2" border="0">';
	submenu += '</td>';
	submenu += '</tr>';
	submenu += '<tr>';
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	submenu += '<input type="button" value="'+(back_to_search_results)+'" onClick="javascript:history.back(0)" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(add_to_favorites)+'" onClick="javascript:StoreFavorites();" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	
	if(image_viewer_url != ''){
	submenu += '<input type="button" value="'+(zoom_pan)+'" onClick="javascript:ImageView();" class="buttons">';}
		
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';
	
	botmenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	botmenu += '<tr>';
	botmenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	
	botmenu += '<input type="button" value="'+(back_to_search_results)+'" onClick="javascript:history.back(0)" class="buttons">';
	botmenu += '&nbsp;&nbsp;';

	botmenu += '<input type="button" value="'+(add_to_favorites)+'" 	onClick="javascript:StoreFavorites();" class="buttons">';

	botmenu += '&nbsp;&nbsp;';	
	if(image_viewer_url != ''){
	botmenu += '<input type="button" value="'+(zoom_pan)+'" onClick="javascript:ImageView();" class="buttons">';}

	botmenu += '</span></td>';
	botmenu += '</tr>';
	botmenu += '</table>';


	break;
	
	case 'results':
	
	submenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	submenu += '<tr>';
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';

	if(browseit){
	searchform = '<br>';}
	
	if(!browseit){
	submenu += '&nbsp;&nbsp;<input type="button" value="'+(search_again)+'" onClick="location.href=\'/cgi-bin/advsearch.exe\'" class="buttons">';}

	submenu += '&nbsp;</span></td>';

	if(browseit){
	submenu += (browsepage);}

	submenu += '<td align="right" valign="middle" style="border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	submenu += '&nbsp;&nbsp;'+(viewby)+': ';
	submenu += '<input type="button" value=" '+(grid)+' " onClick="'+(gogrid)+'" class="stgrid">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(thumbnails)+'" onClick="'+(gothum)+'" class="stthumbnails">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(bibliographic)+'" class="stbibliographic" onclick="'+(gobibl)+'">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value=" '+(titles)+' " class="sttitles" onclick="'+(gotitl)+'">';
	submenu += '<img src="/images/spacer.gif" width="2" height="1" border="0">';
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';


	botmenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="1" cellspacing="0">';
	botmenu += '<tr>';
	botmenu += '<td align="left" valign="middle" style="border-left: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	botmenu += '<input type="button" value=" '+(select_all)+' " onClick="checkAll()" class="buttons" title="'+(select_all)+':\n'+(select_all_descr)+'">&nbsp;&nbsp;';
	botmenu += '<input type="button" value=" '+(clear_all)+' " onClick="clearAll()" class="buttons" title="'+(clear_all)+':\n'+(clear_all_descr)+'">&nbsp;&nbsp;';
	botmenu += '<input id="adfav" type="button" value=" '+(add_to_favorites)+' " class="buttons" onclick="javascript:StoreSelectedFavorites();">';
	botmenu += '</span></td>';
	botmenu += '<td align="right" valign="middle" style="border-right: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';" nowrap>';
	botmenu += '<span class="submenu">';
	botmenu += '&nbsp;&nbsp;<input type="button" value="'+(prev)+'" onClick="'+(goprev)+'" class="stprevious">&nbsp;&nbsp;';
	botmenu += '<input type="button" value="'+(next)+'" onClick="'+(gonext)+'" class="stnext">';

	break;
	
	case 'favorites':
	
	submenu += '<p><br>'+(favorites_top_text)+'<p>';
	submenu += '<table width="100%" bgcolor="'+(subnav_color)+'" border="0" cellpadding="2" cellspacing="0">';
	submenu += '<tr>';
	
	submenu += '<td align="left" valign="middle" style="border-left: 1px solid 	'+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';
	submenu += '&nbsp;';
	submenu += '<input type="button" value=" '+(view_slideshow)+' " onClick="GrabAllItems();" class="buttons">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<img src="/images/spacer.gif" width="2" height="1" border="0">';
	submenu += '</span></td>';
	submenu += '<td align="right" valign="middle" style="border-right: 1px solid 	'+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';border-bottom: 1px solid '+(inner_table_bordercolor)+';" nowrap><span class="submenu">';

	submenu += '&nbsp;&nbsp;'+(viewby)+': ';
	submenu += '<input type="button" value=" '+(grid)+' " onClick="'+(gogrid)+'" class="stgrid">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(thumbnails)+'" onClick="'+(gothum)+'" class="stthumbnails">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value="'+(bibliographic)+'" class="stbibliographic" onclick="'+(gobibl)+'">';
	submenu += '&nbsp;&nbsp;';
	submenu += '<input type="button" value=" '+(titles)+' " class="sttitles" onclick="'+(gotitl)+'">';
	submenu += '<img src="/images/spacer.gif" width="2" height="1" border="0">';
	submenu += '</span></td>';
	submenu += '</tr>';
	submenu += '</table>';

	break;
	
	case 'fav_view':
	
	submenu += '<p>';
	botmenu += '<p>';
	
	break;
	
	default:
	
	submenu += '';
	botmenu += '';
	
	break;

}


// compareview
var compareview = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
compareview += '<tr>';


if(compare){

compareview += '';
compareview += '<form name="compare_viewer">';
compareview += '<td align="right" valign="middle" width="44%">';

compareview += '<select name="compare_a" onchange="if(this.options[this.selectedIndex].value != \'/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM=0\'){parent.image1.location.href=this.options[this.selectedIndex].value}else{alert(compare_error_incompatible)}" style="width:50px">';

compareview += '<option value="/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM=0">- '+(select_items)+' -';

var alloptions = unescape(parent.location.search);

if(alloptions.indexOf('&')!= -1){
comp = alloptions.lastIndexOf('TOTSELECT') + 1;
optionsnum = alloptions.substring(comp+9);}
if(comp_select != null){
for(k=1;k<optionsnum;k++){
(isMac&&comp_select[k][0] == '0')?noimg = ' - '+(not_comparable):noimg = '';
(comp_select[k][0] == '0')?st = 'style="color:#dddddd"':st = '';

compareview += '<option value="/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM='+(comp_select[k][0])+'"'+(st)+'>'+(comp_select[k][1])+(noimg);

}
}
else{}
compareview += '</select>';
compareview += '</td>';
compareview += '<td align="center" valign="middle" width="12%"><span class="navstrip">&lt; compare &gt;</span></td>';
compareview += '<td align="left" valign="middle">';

compareview += '<select name="compare_b" onchange="if(this.options[this.selectedIndex].value != \'/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM=0\'){parent.image2.location.href=this.options[this.selectedIndex].value}else{alert(compare_error_incompatible)}" style="width:50px">';

compareview += '<option value="/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM=0">- '+(select_items)+' -';

if(comp_select != null){
for(k=1;k<optionsnum;k++){
(isMac&&comp_select[k][0] == '0')?noimg = ' - '+(not_comparable):noimg = '';
(comp_select[k][0] == '0')?st = 'style="color:#dddddd"':st = '';

compareview += '<option value="/cgi-bin/compareitemview.exe?DMMODE=compare&CISOITEM='+(comp_select[k][0])+'"'+(st)+'>'+(comp_select[k][1])+(noimg);
}
}
else{}
compareview += '</select>';
compareview += '</td>';
compareview += '<td align="right" valign="middle" width="25%">';
compareview += '<span class="maintext">';

if(isMac){
compareview += '';
}
else{
compareview += '&nbsp;<a class="navstrip" href="javascript:window.close()" target="_top">'+(closewindow)+'</a>&nbsp; ';
}
compareview += '</span></td></form>';}




else {
compareview += '<td align="right" valign="middle">';
compareview += '<span class="navstrip">';

if(isMac){
compareview += '';
}
else{
compareview += '&nbsp;<a class="navstrip" href="javascript:window.close()" target="_top">'+(closewindow)+'</a>&nbsp; ';
}

compareview += '</span></td>';}

compareview += '</tr>';
compareview += '</table>';


// top navigation strip
var navstrip = '<table width="100%" height="22" bgcolor="'+(navstrip_background_color)+'" border="0" cellpadding="0" cellspacing="0">';
navstrip += '<tr>';
navstrip += '<td align="'+(nav_align)+'" valign="middle" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-left: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
navstrip += '<span class="navstrip">';

if(popup){
navstrip += (compareview);}

else{
navstrip += '&nbsp;&nbsp;&nbsp;&nbsp;<a class="navstrip" href="/index.html" target="_top">'+(home)+'</a> &nbsp;|&nbsp; '; 
// navstrip += '<a class="navstrip" href="http://cdm.lib.uiowa.edu/cgi-bin/'+(isAdmin)+'browseresults.exe" target="_top">'+(browse)+'</a> &nbsp;|&nbsp; ';
// navstrip += '<a class="navstrip" href="http://cdm.lib.uiowa.edu/cgi-bin/'+(isAdmin)+'advsearch.exe" target="_top">'+(advanced_search)+'</a> &nbsp;|&nbsp; ';
// navstrip += '<a class="navstrip" href="http://cdm.lib.uiowa.edu/cgi-bin/myfavorites.exe" target="_top">'+(myfavorites)+'</a> &nbsp;|&nbsp; ';
navstrip += '<a class="navstrip" href="/site-templates/about.html" target="_top">'+(about)+'</a> &nbsp;|&nbsp; ';
navstrip += '<a class="navstrip" href="/cgi-bin/'+(isAdmin)+'advsearch.exe" target="_top">'+(search)+'</a> &nbsp;|&nbsp; ';
navstrip += '<a class="navstrip" href="/site-templates/collections.html" target="_top">'+(collections)+'</a> &nbsp;|&nbsp; ';
// navstrip += '<a class="navstrip" href="http://cdm.lib.uiowa.edu/site-templates/help.html'+(helppage)+'" target="_top">'+(help)+'</a>';
navstrip += '&nbsp;&nbsp;&nbsp;&nbsp;';}

navstrip += '</span></td>';
navstrip += '</tr>';
navstrip += '</table>';


// header - includes global, header title & header navigation table
function header(){
var header = '<a name="top"></a>';
header += '<table border="0" cellpadding="0" cellspacing="0" width="'+(page_width)+'" align="'+(page_alignment)+'">';
header += '<form name="headerform">';
header += '<tr>';
header += '<td align="left" valign="top"><span class="maintext">';
header += '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="'+(header_background_color)+'">';
header += '<tr>';
header += '<td align="left"><img src="/images/spacer.gif" width="1" height="5" border="0"></td>';
header += '</tr>';
header += '<tr>';
header += '<td align="left" valign="bottom" nowrap><span class="headertitle">';
header += '&nbsp;'+(header_image)+'&nbsp;'+(header_title);
header += '<input type="hidden" size="10" name="whichpage">';
header += '<input type="hidden" size="10" name="whichfunct">';
header += '<input type="hidden" size="10" name="whichlink">';
header += '<input type="hidden" size="10" name="whichimage2">';
header += '<input type="hidden" size="10" name="whichimage3">';
header += '</span></td>';
header += '</tr>';
header += '<tr>';
header += '<td align="left"><img src="/images/spacer.gif" width="1" height="5" border="0"></td>';
header += '</tr>';
header += '</form>';
header += '</table>';
header += (navstrip);

if((homepage)||(popup)){}
else{
header += '<table border="0" cellpadding="'+(page_margins)+'" cellspacing="0" width="100%">';
header += '<tr>';
header += '<td align="left" valign="top"><span class="maintext">';}

if(results){header += '<p><br><b>'+(search_results)+'</b> '+(search_results_line1);}

if((monograph)||(object)||(doc)){
header += (submenu);
header += '</td></tr></table>';
}

document.write(header);}



// table govenor for all results pages and viewers
function table_gov_start(){
var table_gov_start = '';

if(results){
table_gov_start += '</span>'+(search_results_line2)+'<p>';}

if((results)||(item_view)||(favorites)){
table_gov_start += (submenu);}

else if (fav_view){table_gov_start += '<p>';}

else{table_gov_start += '';}

table_gov_start += '<table width="'+(table_width)+'" border="0" cellpadding="0" cellspacing="0">';
table_gov_start += '<tr><td style="border-bottom: '+(outer_table_border)+'px solid '+(outer_table_bordercolor)+';border-right: '+(outer_table_border)+'px solid '+(outer_table_bordercolor)+';border-top: '+(outer_table_border)+'px solid '+(outer_table_bordercolor)+';border-left: '+(outer_table_border)+'px solid '+(outer_table_bordercolor)+';"><table width="'+(table_width)+'" bgcolor="'+(table_background_color)+'" border="'+(inner_table_border)+'" cellpadding="'+(table_cellpadding)+'" cellspacing="'+(table_cellspacing)+'" bordercolor="'+(inner_table_bordercolor)+'">';
document.write(table_gov_start);}


// results table end
function table_gov_end(){
var table_gov_end = '</table></td></tr></table>';
table_gov_end += (botmenu);
document.write(table_gov_end);}

var edd = '</span></td>';
edd += '</tr>';
edd += '</table>';


// footer table - last nested & self-contained
function footer(){
var footer = '';

if(!homepage){
footer += '</td></tr></table>';}

if(results){
footer += (edd);}

if((results)||(item_view)||(favorites)){
footer += '<p>';}

footer += '<table width="100%" bgcolor="'+(navstrip_background_color)+'" border="0" cellpadding="0" cellspacing="0" height="15">';
footer += '<tr>';
footer += '<td align="left" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-left: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
footer += '<span class="navstrip">';
footer += '&nbsp;&nbsp;&nbsp;&nbsp;&copy '+(copyright)+' &nbsp;|'+(email_address)+'&nbsp; ';
footer += '<a class="navstrip" href="http://www.contentdm.com" target="_blank">powered by CONTENTdm</a>';
footer += '</span></td>';
footer += '<td align="right" style="border-bottom: 1px solid '+(inner_table_bordercolor)+';border-right: 1px solid '+(inner_table_bordercolor)+';border-top: 1px solid '+(inner_table_bordercolor)+';">';
footer += '<span class="navstrip">';
footer += '<a class="navstrip" href="#top">^ '+(totop)+' ^</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
footer += '</span></td>';
footer += '</tr>';
footer += '</table>';
footer += '<p><br>';
document.write(footer);}


// blank row option
if(hrrows){
hr_row = '<tr><td colspan="'+(cols)+'"><hr noshade size="1"></td></tr>';}

else  {
hr_row = '<tr><td colspan="'+(cols)+'" bgcolor="'+(page_background_color)+'"><img src="/images/spacer.gif" alt="" width="1" height="1" border="0"></td></tr>';
}


/*####################### functions ######################## */
	
// zoom & pan window
function ImageView(){
window.open(image_viewer_url,'popup','width=760,height=650,status=no,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes,top=20,screenY=20,left=20,screenX=20');}
	
// cookies
function Get_Cookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

// popup window
var value = null;
var xpos = 0;
var ypos = 0; 

function pop(value,w,h){

	if (document.all) {
  	xpos = window.screenTop + 10;
  	ypos = window.screenLeft + 10;
	}
	else if (document.layers) {
  	xpos = window.screenX + 10;
  	ypos = window.screenY + 10;
	}

	window.open(value,'popup','width=' + w + ',height=' + h + ',status=no,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes,top='+ypos+',screenY='+ypos+',left='+xpos+',screenX='+xpos);}	


// clear form values
function clearDefault(el) {

  if (el.defaultValue==el.value) el.value = ""}


// advanced search functions

//browseresults
function sendbrowse(){

	parent.adsearch.document.BurmaSearchBottom.fg.value=document.BurmaSearchTop.CISONICK.selectedIndex-1;
	document.BurmaSearchTop.submit();
}


function adsearch_submitit(){

var f = parent.adsearch.document.BurmaSearchBottom;
var a = parent.adsearch.document.BurmaSearchBottom.fg.value;
var b = document.BurmaSearchMiddle.selected_item.options[document.BurmaSearchMiddle.selected_item.selectedIndex].value;
var p = parent.adsearch.document.BurmaSearchBottom.CISOFIELD1.options.length;

	if((a == 0)&&(f.CISOFIELD1.selectedIndex == a)){
	f.CISOBOX1.value = b;f.CISOFIELD1.selectedIndex = a;
	}

	if(((a == 1)&&(f.CISOBOX2.value == ''))||((a == 1)&&(f.CISOFIELD2.selectedIndex == a))){
	f.CISOBOX2.value = b;f.CISOFIELD2.selectedIndex = a;
	}
	else if(((a == 1)&&(f.CISOBOX1.value == ''))||((a == 1)&&(f.CISOFIELD1.selectedIndex == a))){
	f.CISOBOX1.value = b;f.CISOFIELD1.selectedIndex = a;
	}

	if(((a == 2)&&(f.CISOBOX3.value == ''))||((a == 2)&&(f.CISOFIELD3.selectedIndex == a))){
	f.CISOBOX3.value = b;f.CISOFIELD3.selectedIndex = a;
	}
	else if(((a == 2)&&(f.CISOBOX2.value == ''))||((a == 2)&&(f.CISOFIELD2.selectedIndex == a))){
	f.CISOBOX2.value = b;f.CISOFIELD2.selectedIndex = a;
	}
	else if(((a == 2)&&(f.CISOBOX1.value == ''))||((a == 2)&&(f.CISOFIELD1.selectedIndex == a))){
	f.CISOBOX1.value = b;f.CISOFIELD1.selectedIndex = a;
	}

	for(k = 3; k < p; k++)
	
	if(((a == (k))&&(f.CISOBOX4.value == ''))||((a == (k))&&(f.CISOFIELD4.selectedIndex == a))){
	f.CISOBOX4.value=b;f.CISOFIELD4.selectedIndex=a;
	}
	else if(((a == (k))&&(f.CISOBOX3.value == ''))||((a == (k))&&(f.CISOFIELD3.selectedIndex == a))){
	f.CISOBOX3.value=b;f.CISOFIELD3.selectedIndex = a;
	}
	else if(((a == (k))&&(f.CISOBOX2.value == ''))||((a == (k))&&(f.CISOFIELD2.selectedIndex == a))){
	f.CISOBOX2.value=b;f.CISOFIELD2.selectedIndex = a;
	}
	else if(((a == (k))&&(f.CISOBOX1.value == ''))||((a == (k))&&(f.CISOFIELD1.selectedIndex == a))){
	f.CISOBOX1.value=b;f.CISOFIELD1.selectedIndex = a;
	}

}

//check for null fields in advanced search

function CheckIt() {

var n = 0;
var m = 0;

	if (document.BurmaSearchBottom.CISOBOX1.value != "") {
    if (document.BurmaSearchBottom.CISOFIELD1.options[document.BurmaSearchBottom.CISOFIELD1.selectedIndex].value == "CISOSEARCHALL")
      n = n + 1;
    else
      m = m + 1;
  }
  
  if (document.BurmaSearchBottom.CISOBOX2.value != "") {
    if (document.BurmaSearchBottom.CISOFIELD2.options[document.BurmaSearchBottom.CISOFIELD2.selectedIndex].value == "CISOSEARCHALL")
      n = n + 1;
    else
      m = m + 1;
  }
  
  if (document.BurmaSearchBottom.CISOBOX3.value != "") {
    if (document.BurmaSearchBottom.CISOFIELD3.options[document.BurmaSearchBottom.CISOFIELD3.selectedIndex].value == "CISOSEARCHALL")
      n = n + 1;
    else
      m = m + 1;
  }
  
  if (document.BurmaSearchBottom.CISOBOX4.value != "") {
    if (document.BurmaSearchBottom.CISOFIELD4.options[document.BurmaSearchBottom.CISOFIELD4.selectedIndex].value == "CISOSEARCHALL")
      n = n + 1;
    else
      m = m + 1;
  }

  if (n > 1){
    alert(search_error_one_search);
    return false;}
  else if (n == 1) {
    if (m > 0){
      alert(search_error_clear_fields);
	return false;
	}
    else{
      return true;
      }
  }
  
  if (m == 0){
      alert(search_error_enter_word);
      return false;
      }
    else{
      return true;
      }
}


//clear field values and reset selects in advanced search

function clearit(form) {

var op = document.forms[0].CISOFIELD4.options.length-1;

	document.forms[0].CISOBOX1.value = "";
	document.forms[0].CISOBOX2.value = "";
  	document.forms[0].CISOBOX3.value = "";
  	document.forms[0].CISOBOX4.value = "";
  	document.forms[0].CISOFIELD1.selectedIndex = 0;
  	document.forms[0].CISOFIELD2.selectedIndex = 1;
  	document.forms[0].CISOFIELD3.selectedIndex = 2;
  	document.forms[0].CISOFIELD4.selectedIndex = op;
}

// search functions

//search all

function SearchAll(){
	if((document.submenuform.CISOBOX1.value == "")||(document.submenuform.CISOBOX1.value == enter_search)){alert(search_error_enter_word);
	return false;
	}
	else{
	return true;
	}
}


// results/browse results page functions

// checkbox functions

function checkAll() {
    for (i=0,n=document.search_results_form.elements.length;i<n;i++)
        if (document.search_results_form.elements[i].name.indexOf('chk_') !=-1)
            document.search_results_form.elements[i].checked = true;
            StatusOff('adfav');
}

function clearAll() {
    for (i=0,n=document.search_results_form.elements.length;i<n;i++)
        if (document.search_results_form.elements[i].name.indexOf('chk_') !=-1)
            document.search_results_form.elements[i].checked = false;
            StatusOn('adfav');
}
 
 
//store selected favorites

function StoreSelectedFavorites(){

var numChecked = 0;
var theForm = document.search_results_form;

  	for (i=0; i<theForm.elements.length; i++) {
    	if (theForm.elements[i].type == 'checkbox' && theForm.elements[i].checked){ 
    	numChecked++;
    	}
  	}
  	
  	if(numChecked != 0){
  	
var items = new Array();

	for(i=0;i<document.search_results_form.elements.length;i++)
	if(document.search_results_form.elements[i].checked){
	items[i] = new Array('chk_1='+document.search_results_form.elements[i].value+'&');
	}

	pop('/cgi-bin/storefavorites.exe?'+(items), 10, 10);
	setTimeout('clearAll()','500');
	}

	else{alert(results_error_select_item);
	}
}


// document viewers functions

function TopCisoRoot(){

	if(TopSearchString.indexOf('&')!= -1){;
	cisoroot = TopSearchString.lastIndexOf('CISOROOT') + 1;
	amp = TopSearchString.indexOf('&');
	root = TopSearchString.substring(cisoroot+8,amp);
	}
	if(TopSearchString.indexOf('&')== -1){;
	cisoroot = TopSearchString.lastIndexOf('CISOROOT') + 1;
	root = TopSearchString.substring(cisoroot+8);
	}
	
	var TopRoot = replacetext(root, '%2F', '/');
	
	return TopRoot;

}


function TopCisOptr(){

	TopShortString = TopSearchString.substring(cisoroot+9+root.length);

	if(TopShortString.indexOf('&')!= -1){;
	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;
	amp = TopShortString.indexOf('&');
	TopOptr = TopShortString.substring(cisoptr+7,amp);
	}

	if(TopShortString.indexOf('&')== -1){;
	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;
	TopOptr = TopShortString.substring(cisoptr+7);
	}
	
	return TopOptr;
}


function PageCisoRoot(){

	HeaderFormSearchString = top.parent.header1.document.headerform.whichpage.value;

	cisoroot2 = HeaderFormSearchString.lastIndexOf('CISOROOT') + 1;
	amp2 = HeaderFormSearchString.indexOf('&');
	root2 = HeaderFormSearchString.substring(cisoroot2+8,amp2);
	PageRoot = replacetext(root2, '%2F', '/');
	
	return PageRoot;
}


function PageCisOptr(){

	HeaderFormSearchString = top.parent.header1.document.headerform.whichpage.value;
	shortsearchstring = HeaderFormSearchString.substring(cisoroot2+9+root2.length);

	if(shortsearchstring.indexOf('&')!= -1){
	cisoptr2 = shortsearchstring.lastIndexOf('CISOPTR') + 1;
	amp2 = shortsearchstring.indexOf('&');
	PageOptr = shortsearchstring.substring(cisoptr2+7,amp2);
	}

	if(shortsearchstring.indexOf('&')== -1){
	cisoptr2 = shortsearchstring.lastIndexOf('CISOPTR') + 1;
	PageOptr = shortsearchstring.substring(cisoptr2+7);
	}
	
	return PageOptr;
}


function PageCisoSearch(){

	if(monograph){
	LeftFormString = top.parent.main.left.location.href;
	}
	else{
	LeftFormString = top.parent.left.location.href;
	}
	
	if(LeftFormString.indexOf('CISOSEARCH')!= -1){
	cisosearch = LeftFormString.indexOf('CISOSEARCH') + 1;
	CisoSearch = LeftFormString.substring(cisosearch+10);
	}
	
	else {
	CisoSearch = '';
	}
	
	return CisoSearch;
}


//search document

function SearchDoc(){

	document.docform.CISOROOT.value = TopCisoRoot();
	document.docform.CISOPTR.value = TopCisOptr();


	if((document.docform.CISOSEARCH.value == '')||(document.docform.CISOSEARCH.value == enter_search)){
	alert(search_error_enter_word);
	return false;
	}
	
	else{
		return true;
	}
}

//search monograph

function SearchMono(){

	if((document.monoform.CISOSEARCH.value == '')||(document.monoform.CISOSEARCH.value == enter_search)){
	alert(search_error_enter_word)
	return false;
	}
	
	else{
		if(monograph){
		parent.left.location.href = '/cgi-bin/docmenu.exe?CISOROOT='+TopCisoRoot()+'&CISOPTR='+TopCisOptr()+'&CISOSEARCH='+document.monoform.CISOSEARCH.value;
	}
	
		else{
		location.href = '/cgi-bin/docmenu.exe?CISOROOT='+TopCisoRoot()+'&CISOPTR='+TopCisOptr()+'&CISOSEARCH='+document.monoform.CISOSEARCH.value;
		}
	}
}


//store favorites

function StoreFavorites(){

	pop('/cgi-bin/storefavorites.exe?chk_1='+TopCisoRoot()+','+TopCisOptr(), 10, 10);
	
}



//store page to favorites

function StorePageFavorites(){

	pop('/cgi-bin/storefavorites.exe?chk_1='+PageCisoRoot()+','+PageCisOptr(), 10, 10);
	
}


//document description

function DocDescr(){

	if(doc){
parent.right.location.href='/cgi-bin/docmetaview.exe?CISOROOT='+TopCisoRoot()+'&CISOPTR='+TopCisOptr();

	}

	if(monograph){
parent.main.right.location.href='/cgi-bin/docmetaview.exe?CISOROOT='+TopCisoRoot()+'&CISOPTR='+TopCisOptr();

	}
	
}


//page description

function PageDescr(){
	
		if(doc){
parent.right.location.href='/cgi-bin/docmetaview.exe?CISOROOT='+PageCisoRoot()+'&CISOPTR='+PageCisOptr();

		}
	
		if(monograph){
parent.main.right.location.href='/cgi-bin/docmetaview.exe?CISOROOT='+PageCisoRoot()+'&CISOPTR='+PageCisOptr();

		}
}


//page and text description

function PageText(){
if(top.parent.header1.document.headerform.whichlink.value == ''){
top.parent.header1.document.headerform.whichlink.value = '1'
}
var monogr = 'documentviewer';
if(monograph){var monogr = 'monographviewer';}
pop('/cgi-bin/sidexside.exe?CISOROOT='+PageCisoRoot()+'&CISOPTR='+PageCisOptr()+'&'+monogr+'&CISOSEARCH='+PageCisoSearch(), 760, 500);
}


//both postcard views

function BothViews(){

	pop('/cgi-bin/postcardviewer.exe?CISOROOT='+TopCisoRoot()+'&CISOPTR='+TopCisOptr(), 760, 500);
	
}


// change nav colors & stores links for page descriptions

function changeColor(num) {
var linkname='item';
if (ns){linkname='document.links.item';}

var n = 1;
(doc)?mn = 1:mn = -1;
(postcard)?mn = -1:0;
	for (n = 1; n < totalitems; n = n+1) {
		if (n == num){
		eval(linkname + n + '.style.color="'+(link_hover_color)+'"');
			if(doc){
			top.parent.header1.document.headerform.whichpage.value = document.links[n+mn].href;
			top.parent.header1.document.headerform.whichlink.value = num;
			}
			else{
			top.parent.header1.document.headerform.whichpage.value = List_menu[num][2];
			top.parent.header1.document.headerform.whichlink.value = num;
			}
		}
		else{
		eval(linkname + n + '.style.color="'+(dyna_sub_menu_color)+'"');
		}
	}
	return true;
}

// my favorites functions

function CompareIt(form) {

	if ((form.a.options[form.a.selectedIndex].value == "0") || 	(form.b.options[form.b.selectedIndex].value == "0"))
    alert(compare_error_incompatible);
	else if (form.a.options[form.a.selectedIndex].value == form.b.options[form.b.selectedIndex].value)
    alert(compare_error_same_type);
	else { 		pop('/cgi-bin/compareviewer.exe?DMMODE=compare&CISOITEM1='+document.compare.a.options[document.compare.a.options.selectedIndex].text+'&CISOITEM2='+document.compare.b.options[document.compare.b.options.selectedIndex].text+'&TOTSELECT='+document.compare.a.options.length, '760', '500');
	}
}


function checkmove(form) {
	
	if (form.CISOITEM.options[form.CISOITEM.selectedIndex].value == "0")
    alert(move_error);
	else if (form.CISOPOS.options[form.CISOPOS.selectedIndex].value == "0")
    alert(move_error_select_position);
	else if (form.CISOITEM.options[form.CISOITEM.selectedIndex].value == form.CISOPOS.options[form.CISOPOS.selectedIndex].value)
	alert(move_error_different_position);
	else
	if (confirm(items_moved)){
    form.submit();
    }
}


function checkdel(form) {

	if (form.CISOITEM.options[form.CISOITEM.selectedIndex].value == "0")
    alert(remove_error);
	else
	if (confirm(items_deleted)){
    form.submit();
    }
}


//browse select box selected item

function ChangeSelect(){

	for(j=0;j<BrowseItems.length;j++)
	
	if(BrowseItems[j][0] == TopCisoRoot()){
	document.browselist.CISOROOT.selectedIndex = j;
	
	break;
	}
}

//compare items box selected item

function CompareItemSelect(){

var selop = unescape(parent.location.search);

item1 = selop.lastIndexOf('CISOITEM1') + 1;
amp1 = selop.indexOf('&CISOITEM2');
opitem1 = selop.substring(item1+9,amp1);

item2 = selop.lastIndexOf('CISOITEM2') + 1;
amp2 = selop.indexOf('&TOTSELECT');
opitem2 = selop.substring(item2+9,amp2);

parent.header1.document.compare_viewer.compare_a.selectedIndex = (opitem1);
parent.header1.document.compare_viewer.compare_b.selectedIndex = (opitem2);
}


// counts occurances of CISOROOT in url string

function countInstances(string, word) {

var substrings = string.split(word);

	return substrings.length - 1;
}


// replaces underscores in filename

function replacetext(string,text,by) {

	var strLength = string.length, txtLength = text.length;
	
    if ((strLength == 0) || (txtLength == 0)) 
    return string;

    var i = string.indexOf(text);
    
    if ((!i) && (text != string.substring(0,txtLength))) 
    return string;
    
    if (i == -1) 
    return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
	newstr += replacetext(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}


// capatilize

function toUpper(str) {

var pattern = /(\w)(\w*)/; // a letter, and then one, none or more letters 
var a = str.split(/\s+/g); // split the sentence into an array of words

    for (i = 0 ; i < a.length ; i ++ ) {
	var parts = a[i].match(pattern); // just a temp variable to store the fragments in.
	var firstLetter = parts[1].toUpperCase();
	var restOfWord = parts[2].toLowerCase();

	 a[i] = firstLetter + restOfWord; // re-assign it back to the array and move on
    }
   
    str = document.write(a.join(' ')); // join it back together
}


// hide show

function showob(object) {

	if (document.getElementById){
	myObject = eval(document.getElementById('' + object + ''));
	myObject.style.visibility = 'visible';
	}
	
    else if (document.layers) {
		if (document.layers[object] != null) 
		document.layers[object].visibility = 'visible';
    	}
    	
    else if (document.all)
	document.all[object].style.visibility = 'visible';
}

function hideob(object) {
	if (document.getElementById){
	myObject = eval(document.getElementById('' + object + ''));
	myObject.style.visibility = 'hidden';
	}
	
    else if (document.layers) {
        if (document.layers[object] != null)
         document.layers[object].visibility = 'hidden';
    }
    
    else if (document.all)
	document.all[object].style.visibility = 'hidden';
}


// my favorites instructions

function instr(){

pop('publish_instructions.htm', 200, 200);
}


// global blank init

function init(){

	if(browseit){
	ChangeSelect();
	}
	if(compare){
	CompareItemSelect();
	}
	if(popup){
	window.focus();
	}
	if(!searchbox){
	parent.header1.hideob('pageviews');
	}
	if(!parent.mono_searchbox){
	top.parent.header1.hideob('pageviews');
	}
}

function StatusOff(id) {

	if (document.getElementById){
		myObject = eval(document.getElementById('' + id + ''));
		myObject.style.color = button_font_color;
	}
	
     if (document.all) {
		document.all[id].style.color = button_font_color;
    }
}

function StatusOn(id) {

	if (document.getElementById){
		myObject = eval(document.getElementById('' + id + ''));
		myObject.style.color = notthere_font_color;
	}
	
     if (document.all) {
		document.all[id].style.color = notthere_font_color;
    }
}

function isStatus(){

	var numChecked = 0;
	var theForm = document.search_results_form;

  	for (i=0; i<theForm.elements.length; i++) {
    if (theForm.elements[i].type == 'checkbox' && theForm.elements[i].checked) numChecked++;
  	}
  	
  		if(numChecked != 0){
  		StatusOff('adfav');
  		}
  	
		else{
		StatusOn('adfav');
		}
}


//-->