var hash = new Object();

var formAction = "/cgi-bin/asp/philo/search3t?";

hash['word']="Search Texts:";
hash['CONJUNCT[1]'] = 'Single term and phrase search<p>';
hash['CONJUNCT[2]'] = 'Proximity search in the <b>same sentence</b>';
hash['CONJUNCT[3]'] = 'Proximity search in the <b>same paragraph</b>';
hash['CONJUNCT[4]'] = 'Proximity search';
hash['DISTANCE'] = 'separated by';
hash['PROXY0'] = 'words <b>or fewer</b> in the same sentence.<p>';
hash['PROXY1'] = 'words <b>exactly</b> in the same sentence.<p>';

hash['agewhenwriting'] = "Age when Writing:";
hash['docauthorname'] = "Author:";
hash['allawards'] = "Awards:";
hash['authrace'] = "Race:";
hash['authorgender0'] = "Gender: <font color=#000000>All</font>";
hash['authorgender1'] = "Gender: <font color=#000000>Male</font>";
hash['authorgender2'] = "Gender: <font color=#000000>Female</font>";
hash['birthplace'] = "Place of Birth:";
hash['birthyear'] = "Year of Birth:";
hash['capacity'] = "Capacity (Seats}:";
hash['char_author'] = "Author:";
hash['char_briefname'] = "Character Name:";
hash['char_gender0'] = "Gender: <font color=#000000>All</font>";
hash['char_gender1'] = "Gender: <font color=#000000>Male</font>";
hash['char_gender2'] = "Gender: <font color=#000000>Female</font>";
hash['char_gender3'] = "Gender: <font color=#000000>Not Indicated</font>";
hash['char_code'] = "Character Code:";
hash['char_nationality'] = "Nationality:";
hash['char_occupation'] = "Occupation:";
hash['char_performers'] = "Performers:";
hash['char_race'] = "Race:";
hash['char_realperson_name'] = "Person Based On:";
hash['char_sexorient'] = "Sexual Orientation:";
hash['char_work_brieftitle'] = "Play Title:";
hash['chartype'] = "Type:";
hash['deathplace'] = "Place of Death:";
hash['deathyear'] = "Year of Death:";
hash['doc_allsubjects'] = "All Subjects:";
hash['doc_char_occupation'] = "Occupation:";
hash['doc_char_race'] = "Race:";
hash['doc_char_gender0'] = "Gender: <font color=#000000>All</font>";
hash['doc_char_gender1'] = "Gender: <font color=#000000>Male</font>";
hash['doc_char_gender2'] = "Gender: <font color=#000000>Female</font>";
hash['doc_char_sexorient'] = "Sexual Orientation:";
hash['doc_characters'] = "Character:";
hash['doc_code'] = "Scene Code:";
hash['doc_numcharacters'] = "Number of Characters:";
hash['doc_playtitle'] = "Play Title:";
hash['doc_scenefulltitle'] = "Scene Title:";
hash['doc_setting_full'] = "Setting:";
hash['doc_subj_broad'] = "Broad:";
hash['doc_subj_geo'] = "Geographical:";
hash['doc_subj_hist'] = "Historical:";
hash['doc_subj_name'] = "Name of Subject:";
hash['doc_subj_org'] = "Organizations:";
hash['doc_subj_personalevent']="Personal Event:";
hash['doc_subj_topic'] = "Topic:";
hash['docauthorid'] = "Author ID:";
hash['educlevel'] = "Level of Education:";
hash['litperiods'] = "Literary Period:";
hash['location'] = "Location:";
hash['nationality'] = "Nationality:";
hash['occupation'] = "Occupation:";
hash['prod_cast'] = "Performers:";
hash['prod_choreographer_names'] = "Choreographer:";
hash['prod_code'] = "Production Code:";
hash['prod_composers'] = "Composer:";
hash['prod_costumes_names'] = "Costume:";
hash['prod_director'] = "Director:";
hash['prod_lighting_names'] = "Lighting:";
hash['prod_music_names'] = "Music:";
hash['prod_numperformances'] = "Performances:";
hash['prod_playtitle'] = "Play Title:";
hash['prod_producer'] = "Producer:";
hash['prod_isfirst0'] = "First Production: <font color=#000000>All</font>";
hash['prod_isfirst1'] = "First Production: <font color=#000000>Yes</font>";
hash['prod_isfirst2'] = "First Production: <font color=#000000>No</font>";
hash['prod_isfirst3'] = "First Production: <font color=#000000>Not Indicated</font>";
hash['prod_productioncompany'] = "Production Company:";
hash['prod_productioncompany_name'] = "Assoc. Production Company:";
hash['prod_setdesigner_names'] = "Set Designer:";
hash['prod_sound_names'] = "Sound:";
hash['prod_startmonth'] = "Start Month:";
hash['prod_startyear'] = "Start Year:";  
hash['prod_theatername'] = "Theater Name:";
hash['prod_theatstyle'] = "Theater Style:"; 
hash['prod_type'] = 'Production Type:';
hash['previouslyunpublished0'] = "Previously Unpublished: <font color=#000000>All</font>";
hash['previouslyunpublished1'] = "Previously Unpublished: <font color=#000000>Yes</font>";
hash['previouslyunpublished2'] = "Previously Unpublished: <font color=#000000>No</font>";
hash['religion'] = 'Religion:';
hash['resource_performers'] = 'Associated Performers:';
hash['resource_theaternames'] = 'Associated Theaters:';
hash['resource_title'] = "Resource Title:";
hash['resource_yearcreated'] = "Year Created:";
hash['schoolattend'] = "School Attended:";
hash['sexorient'] = "Sexual Orientation:";
hash['theatername'] = "Theater Name:";
hash['theatstyle'] = "Theater Style:";
hash['venue_id'] = "Venue Code:";
hash['venue_prod_playtitle'] = "Plays Produced at this Theater:";
hash['venue_prodcast'] = "Performer(s):";
hash['venuelocation'] = "Theater District:";
hash['work_allauthors'] = "Author:";
hash['work_allauthorsallforms'] = "Author:";
hash['work_code'] = "Play Code:";
hash['work_composers'] = "Composers:";
hash['work_genre'] = "Genre:";
hash['work_litperiod'] = "Literary Period:"
hash['work_playtitle'] = "Play Title:";
hash['work_prod_cast'] = "Performers:";
hash['work_productioncompany_names'] = "Production Company:";
hash['work_setting_full'] = "Settings:";
hash['work_subject'] = 'Subject Headings:';
hash['work_theaternames'] = 'Theater Name:';
hash['work_writtenfor'] = 'Written for:';
hash['work_year_firstprod'] = 'Year First Produced:';
hash['work_yearfirstprod'] = 'Year First Produced:'
hash['work_yearpublished'] = 'Year Published:';
hash['work_yearwritten'] = 'Year Written:';
hash['work_sort_title'] = 'Play Title:';

hash['OUTPUT[1]'] = '<p>Results Format:<font color=#000000> Occurrences Line by Line<font color=#000000>';
hash['OUTPUT[2]'] = '<p>Results Format: <font color=#000000>Frequency by Author<font color=#000000>';
hash['OUTPUT[3]'] = '<p>Results Format: <font color=#000000>Frequency by Year<font color=#000000>';
hash['OUTPUT[4]'] = '<p>Results Format: <font color=#000000>Frequency by Source<font color=#000000>';
hash['OUTPUT[5]'] = '<p>Results Format: <font color=#000000>Collocation Table<font color=#000000>';

function prepareItems() {

	hash['DISTANCE'] = 'separated by';
	hash['PROXY0'] = 'words <b>or fewer</b> in the same sentence.<p>';
	hash['PROXY1'] = 'words <b>exactly</b> in the same sentence.<p>';

	var preserveFlag=0;
	var conjunctFlag=0;
	
	for (var j = 0; j < currentHistoryItem.length; j++) {	
	
		if (currentHistoryItem[j].indexOf("CONJUNCT[3]") > -1) {
			conjunctFlag=1;
		}
	}
		
	if (conjunctFlag==0) {
		hash['DISTANCE'] = null;
		hash['PROXY0'] = null;
		hash['PROXY1'] = null;
	}
}

function pageSpecificMapping(s) {
       //s = s.replace(/docauthorname/, 'allauthorforms');
	return s;
}

var errorHash = new Object();

errorHash['poemtitle'] = 'philologic';
errorHash['word']= 'philologic';

errorHash['agewhenwriting'] = "sqlnumeric";
errorHash['allauthorforms'] = "sql";
errorHash['docauthorname'] = "sql";
errorHash['allawards'] = "sql";
errorHash['authrace'] = "sql";
errorHash['authorgender'] = "sql";
errorHash['birthplace'] = "sql";
errorHash['birthyear'] = "sqlnumeric";
errorHash['capacity'] = "sqlnumeric";
errorHash['char_author'] = "sql";
errorHash['char_briefname'] = "sql";
errorHash['char_gender'] = "sql";
errorHash['char_code'] = "sql";
errorHash['char_nationality'] = "sql";
errorHash['char_occupation'] = "sql";
errorHash['char_performers'] = "sql";
errorHash['char_race'] = "sql";
errorHash['char_realperson_name'] = "sql";
errorHash['char_sexorient'] = "sql";
errorHash['char_work_brieftitle'] = "sql";
errorHash['chartype'] = "sql";
errorHash['deathplace'] = "sql";
errorHash['deathyear'] = "sqlnumeric";
errorHash['doc_allsubjects'] = "sql";
errorHash['doc_char_occupation'] = "sql";
errorHash['doc_char_race'] = "sql";
errorHash['doc_char_gender'] = "sql";
errorHash['doc_char_sexorient'] = "sql";
errorHash['doc_characters'] = "sql";
errorHash['doc_code'] = "sql";
errorHash['doc_numcharacters'] = "sqlnumeric";
errorHash['doc_playtitle'] = "sql";
errorHash['doc_scenefulltitle'] = "sql";
errorHash['doc_setting_full'] = "sql";
errorHash['doc_subj_broad'] = "sql";
errorHash['doc_subj_geo'] = "sql";
errorHash['doc_subj_hist'] = "sql";
errorHash['doc_subj_name'] = "sql";
errorHash['doc_subj_org'] = "sql";
errorHash['doc_subj_personalevent']="sql";
errorHash['doc_subj_topic'] = "sql";
errorHash['docauthorid'] = "sql";
errorHash['educlevel'] = "sql";
errorHash['litperiods'] = "sql";
errorHash['location'] = "sql";
errorHash['nationality'] = "sql";
errorHash['occupation'] = "sql";
errorHash['prod_cast'] = "sql";
errorHash['prod_choreographer_names'] = "sql";
errorHash['prod_code'] = "sql:";
errorHash['prod_composers'] = "sql";
errorHash['prod_costumes_names'] = "sql";
errorHash['prod_director'] = "sql";
errorHash['prod_lighting_names'] = "sql";
errorHash['prod_music_names'] = "sql";
errorHash['prod_numperformances'] = "sqlnumeric";
errorHash['prod_playtitle'] = "sql";
errorHash['prod_producer'] = "sql";
errorHash['prod_isfirst'] = "sql";
errorHash['prod_productioncompany'] = "sql";
errorHash['prod_productioncompany_name'] = "sql";
errorHash['prod_setdesigner_names'] = "sql";
errorHash['prod_sound_names'] = "sql";
errorHash['prod_startmonth'] = "sql";
errorHash['prod_startyear'] = "sqlnumeric";  
errorHash['prod_theatername'] = "sql";
errorHash['prod_theatstyle'] = "sql"; 
errorHash['prod_type'] = 'sql';
errorHash['previouslyunpublished'] = "sql"
errorHash['religion'] = 'sql';
errorHash['resource_performers'] = 'sql';
errorHash['resource_theaternames'] = 'sql';
errorHash['resource_title'] = "sql";
errorHash['resource_yearcreated'] = "sqlnumeric";
errorHash['schoolattend'] = "sql";
errorHash['sexorient'] = "sql";
errorHash['theatername'] = "sql";
errorHash['theatstyle'] = "sql";
errorHash['venue_id'] = "sql";
errorHash['venue_prod_playtitle'] = "sql";
errorHash['venue_prodcast'] = "sql";
errorHash['venuelocation'] = "sql";
errorHash['work_allauthors'] = "sql";
errorHash['work_allauthorsallforms'] = "sql";
errorHash['work_code'] = "sql";
errorHash['work_composers'] = "sql";
errorHash['work_genre'] = "sql";
errorHash['work_litperiod'] = "sql"
errorHash['work_playtitle'] = "sql";
errorHash['work_prod_cast'] = "sql";
errorHash['work_productioncompany_names'] = "sql";
errorHash['work_setting_full'] = "sql";
errorHash['work_subject'] = 'sql';
errorHash['work_theaternames'] = 'sql';
errorHash['work_writtenfor'] = 'sql';
errorHash['work_year_firstprod'] = 'sql';
errorHash['work_yearfirstprod'] = 'sql';
errorHash['work_yearpublished'] = 'sql';
errorHash['work_yearwritten'] = 'sqlnumeric';
errorHash['work_sort_title'] = 'sql';
