		<!--
			var xmlHttp;
			xmlHttp=0;
			function createXMLHttpRequest()
			{
				if (window.ActiveXObject)	
				{
					xmlHttp = new ActiveXObject("Microsoft.XMLHLTTP");	
				}
				else if (window.XMLHttpRequest)
				{
					xmlHttp = new XMLHttpRequest();
				}
			}		
			
			//Send command to BLD_search.php to see if form just entered is already in BLD
			function searchBLD(x) 
			{
				dehighlight(x);
				var form = document.getElementById("form").value;
			    if (form != '')
				{
			    	createXMLHttpRequest();
			    
	    			var queryString = "BLD_search.php?form=" + form;  					xmlHttp.open("GET", queryString, true);    				xmlHttp.onreadystatechange = searchBLDResponse;    				xmlHttp.send(null);			    
				}
			}
			
			//Make sure Form and Translation fields filled in
			function validateAdd()
			{
				if(!document.getElementById || !document.createTextNode){return;}	
				//if(!document.getElementById('search')){return;} 
		        var formValue=document.getElementById('form').value;
		        var translationValue=document.getElementById('translation').value;		         
        		if(formValue=='' || translationValue=='') 
		        { 
        		  alert('Please enter a form AND a translation'); 
		          return false; 
        		} 
		        else 
        		{ 
		          return true; 
				}
			}
			
			//Trim function
			function trim(inBLD) 
			{				return inBLD.replace(/^\s+|\s+$/g,"");			}
			
			//Warn user if they are adding a repeat form
			function searchBLDResponse() 
			{			    if(xmlHttp.readyState == 4) 
			    {			        if(xmlHttp.status == 200) 
			        {
						var inBLD = xmlHttp.responseText;
						if(xmlHttp.responseText)
						{
						    document.getElementById("xarx").innerHTML = xmlHttp.responseText; 
						}			        }			    }			}	
			
			//Highlight and unhighlight form fields
			function highlight(x)
			{
				document.getElementById(x).style.background="#C0C0C0";
			}
			function dehighlight(x)
			{
				document.getElementById(x).style.background="white";
			}
			
			//Login with a Prompt
			function loginShortcut()
			{
				
			}

			//See whether BLD contains the morpheme just entered
			function findMorpheme() 
			{
				var morphbreak = document.getElementById("morphbreak").value;
				morphbreak = morphbreak.replace(/ /g, "-");
				var morphemes = morphbreak.split("-");
				var warning;
			    if (morphbreak != '')
				{
			    	for (var x=0; x < morphemes.length; x++)
			    	{
			    		var morpheme = morphemes[x];
			    		if (x==0)
			    		{
			    			warning = searchBLDForMorpheme(morpheme);
							document.getElementById("morphbreak_find").innerHTML = warning;
			    		}
			    		else
			    		{
				    		warning = warning + "<br />" + searchBLDForMorpheme(morpheme);
			    			document.getElementById("morphbreak_find").innerHTML = warning;
			    		}
			    	}
				}
			}

			//See if morpheme is in BLD
			function searchBLDForMorpheme(morpheme)
			{
			    	createXMLHttpRequest();
	    			var queryString = "BLD_search_morpheme.php?morpheme=" + morpheme;  					xmlHttp.open("GET", queryString, true);    				xmlHttp.onreadystatechange = findMorphemeResponse;    				xmlHttp.send(null);			
    				return(xmlHttp.responseText);		
			}

			//Inform user that the morpheme they just entered in morphbreak is in the BLD
			function findMorphemeResponse() 
			{			    if(xmlHttp.readyState == 4) 
			    {			        if(xmlHttp.status == 200) 
			        {
						if(xmlHttp.responseText)
						{
						    return(xmlHttp.responseText); 
						}			        }			    }			}
			
			//Display a search box in top right for the quicksearch
			function dropdownSearchBox()			
			{
				var presence = document.getElementById('searchBox').innerHTML;
				if (presence) {
					document.getElementById('searchBox').innerHTML = '';
				}
				else
				{
				var searchBoxContent = "<div id='search_box_a'><a href='' onclick='dropdownSearchBox();return false' title='close this window'  style='position:relative;float:right;border:1px solid #d0232a;padding:2px;'>X</a><div id='quicksearch_help'></div><input type='text' id='quicksearch_term' tabindex='0' onfocus='highlight(this.id)' onblur='dehighlight(this.id)' onkeyup='searchBLDBox()' /><br /><a href='#' onclick=display_help_box('quicksearch_help') title='what is quicksearch?'  style='position:relative;float:right;'>?</a>Bf-En<input type='radio'  name='direction' id='direction' value='bfen' checked='checked' /> &nbsp&nbsp&nbsp&nbsp En-Bf<input type='radio' name='direction' id='direction' value='enbf' /><br /><div id='dropdown_response'></div></div>"; 
				document.getElementById('searchBox').innerHTML = searchBoxContent;
				document.getElementById('quicksearch_term').accessKey="f";
				}
			}
			
			//Search BLD for term entered into dropdownSearchBox		
			function searchBLDBox()		
			{
				var quicksearch_term = document.getElementById("quicksearch_term").value;
				var direction = document.getElementById("direction").checked;
				//var quicksearch_direction = document.getElementById("direction").value;				
			    if (quicksearch_term != '')
				{
			    	createXMLHttpRequest();
	    			if (direction==true)
					{
		    			var queryString = "BLD_search_Box.php?form=" + quicksearch_term;					}
					else
					{
						var queryString = "BLD_search_Box_backwards.php?translation=" + quicksearch_term;
					}  					xmlHttp.open("GET", queryString, true);    				xmlHttp.onreadystatechange = searchBLDResponseBox;    				xmlHttp.send(null);			    
				}	
			}
			
			//Display response to query in quicksearch dropdown box
			function searchBLDResponseBox() 
			{			    if(xmlHttp.readyState != 4)
			    {
				    document.getElementById("dropdown_response").innerHTML = "<span style='color: #600'>Searching...</span>"; 
			    }
			    if(xmlHttp.readyState == 4) 
			    {			        if(xmlHttp.status == 200) 
			        {
						var inBLD = xmlHttp.responseText;
						if(xmlHttp.responseText)
						{
						    document.getElementById("dropdown_response").innerHTML = xmlHttp.responseText; 
						}			        }			    }			}	
			
			function uploading()
			{
				document.getElementById('fileLoading').innerHTML = "<span style='color:#600'>Uploading...</span>"	
			}
			
			
			//Accesskey assignments
			function accesskey()
			{	
				document.getElementById('forms_search').accessKey="s";
				document.getElementById('forms_add').accessKey="a";
				document.getElementById('memory').accessKey="m";
				document.getElementById('quicksearch').accessKey="q";
				document.getElementById('home_link').accessKey="h";
				document.getElementById('people').accessKey="p";
				//document.getElementById('research').accessKey="r";	
				document.getElementById('forms').accessKey="f";
				document.getElementById('collections').accessKey="c";
			}		
			
			
			//Called when user wants to add all formids in Memory to the Collection file association input
			function memoryList()
			{
		    	createXMLHttpRequest();			    
    			var queryString = "BLD_memory_list.php";				xmlHttp.open("GET", queryString, true);   				xmlHttp.onreadystatechange = memoryListBLDResponse;   				xmlHttp.send(null);						
			}
			
			//Puts list of formids in Memory into Collection file association input
			function memoryListBLDResponse() 
			{			    if(xmlHttp.readyState == 4) 
			    {			        if(xmlHttp.status == 200) 
			        {
						if(xmlHttp.responseText)
						{
						    document.getElementById("formid_collection").value = xmlHttp.responseText; 
						}			        }			    }			}			
			
			
			//Opens Testing Window
			function openTestingWindow()
			{						var width  = 500;
				var height = 500;
				var left   = (screen.width  - width)/2; 				var top    = (screen.height - height)/2;
				window.open('test.php', 'test', 'width=500, height=500, top='+top+', left='+left);	
			}
			
			//Reveals audio file as embedded
			function displayEmbeddedAudio(retrieveName,divID,arrowID,mimeTypeX)
			{
				var presenceFile = document.getElementById(divID).innerHTML;
				if (presenceFile) 
				{
					document.getElementById(divID).innerHTML = '';
					document.getElementById(arrowID).src = 'icons/arrow_right.png'; 
				}
				else
				{			
					var embeddedAudioContent;
					if (mimeTypeX=="Audio")
					{
						embeddedAudioContent = "<embed src='uploads/"+retrieveName+"' height='15' width='200' autostart='false' />";
					}
					else if (mimeTypeX=="Image")
					{
						embeddedAudioContent = "<a href='uploads/"+retrieveName+"'><img src='uploads/"+retrieveName+"' width='200'/></a>";
					}
				    document.getElementById(divID).innerHTML = embeddedAudioContent;
					document.getElementById(arrowID).src = 'icons/arrow_down.png';				    
				}
			}
			
			//Function that shows more info for a given Collection
			function moreStoryInfo(arrowButton, moreInfoDiv, moreInfoContent, storySpan)
			{
				var presenceMoreInfo = document.getElementById(moreInfoDiv).innerHTML;
				if (presenceMoreInfo) 
				{
					document.getElementById(moreInfoDiv).innerHTML = '';
					document.getElementById(arrowButton).src = 'icons/arrow_right_transp.png'; 
					document.getElementById(storySpan).innerHTML = 'More details...';
				}
				else
				{
					document.getElementById(moreInfoDiv).innerHTML = moreInfoContent;
					document.getElementById(arrowButton).src = 'icons/arrow_down_transp.png'; 
					document.getElementById(storySpan).innerHTML = 'Fewer details...';
				}
			}

			function displayEmbedForm()
			{
				var presenceEmbedForm = document.getElementById("embed_form").innerHTML;
				if (presenceEmbedForm!='')
				{
					document.getElementById("embed_form").innerHTML = '';
					document.getElementById("embed_form_button").innerHTML = "<img src='icons/arrow_right_transp.png' id='embed_form_arrow' />Show Form";			
					document.getElementById("embed_form_description").innerHTML = '';
				}
				else
				{
					var form = "<form action='upload_audio.php' method='post'><input type='hidden' name='from_embedding' value='yes' /><span class='warning'>*</span>Video Name:<br /><input size='72' type='text' name='embed_name' tabindex='49'/><br /><span class='warning'>*</span>Embed Code (enter the code here from the video-streaming web-application):<br /><textarea tabindex='50' name='embed_code' cols='70' rows='8'></textarea><br />Password (enter the password, if required, to view the video):<br /><input size='72' tabindex='51' type='text' name='embed_password' /><br />Description of Video:<br /><textarea name='embed_description' tabindex='52' maxlength='2000' cols='70' rows='5'></textarea><br /><input tabindex='53' type='submit' value='Embed' /></form>";
					var description = "<ul><li>Since video files can be quite large, the best strategy for associating a video file to the BLD might be the following.  Upload your video to a video-streaming web application like YouTube or Vimeo (<a href='http://www.vimeo.com'>www.vimeo.com</a>), find out how to get the small piece of code that allows you to embed your Youtube or Vimeo video on another site and enter that code in the form here.</li></ul>";
					document.getElementById("embed_form").innerHTML = form;
					document.getElementById("embed_form_button").innerHTML = "<img src='icons/arrow_down_transp.png' id='embed_form_arrow' />Hide Form";			
					document.getElementById("embed_form_description").innerHTML = description;
				}
			}
			
			//Displays embedded video file
			function displayEmbeddedVideoViewer(retrieveName,divID,arrowID,mimeTypeX,embedCode)
			{
				var presenceFile = document.getElementById(divID).innerHTML;
				if (presenceFile) 
				{
					document.getElementById(divID).innerHTML = '';
					document.getElementById(arrowID).src = 'icons/arrow_right.png'; 
				}
				else
				{			
					var embeddedAudioContent;
					embeddedAudioContent = embedCode.replace(/\|\|\|\|\|/g,"'");
				    document.getElementById(divID).innerHTML = embeddedAudioContent;
					document.getElementById(arrowID).src = 'icons/arrow_down.png';				    
				}
			}
			
			function display_help_box(divID)
			{
				var presence = document.getElementById(divID).innerHTML;
				if (presence=='')
				{
					if(divID=="form_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('form_help')>X</a><p><b>Form Field (required).</b>  The form field should contain a transcription of the Blackfoot utterance that reflects how it was uttered by the speaker.  This transcription should make use of the spelling conventions of Frantz (1991) and Frantz & Russell (1989, 1995), i.e., limited to the characters {p, t, k, s, m, n, w, y, &rsquo;, a, i, o, &aacute;, &iacute;, &oacute;}. Note that the term &ldquo;form&rdquo; is here used to refer both to the transcription of the Blackfoot utterance as well as to the entire set of entities documenting that utterance (i.e., the set including the form, morpheme break, morhpheme gloss, translation, general comments, etc.).</p><p>Entering accented characters: you should be able to enter accutely accented characters (&aacute;, &iacute;, &oacute;) in this field in the same way you normally would on your operating system.  This means you can copy and paste text from other documents (e.g., Word) right into the form field (and any of the other fields) and accented characters will render correctly and tabs will automatically be transformed into spaces.  If you have trouble entering accented characters, you can always enter the following numerals in both the form and morphbreak fields and they will be transformed into the corresponding accented characters: &ldquo;1&rdquo; => &iacute;, &ldquo;2&rdquo; => &oacute;, &ldquo;3&rdquo; => &aacute;. <a href='help.php#form' title='view &ldquo;forms&rdquo; section of Help pages'>More...</a></p></div></div>";
					}
					else if(divID=="morphbreak_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('morphbreak_help')>X</a><b>Morpheme Break Field.</b>  The morpheme break field should contain a morphemic breakdown of the form (e.g., the morphbreak of &ldquo;ponok&aacute;&oacute;mitaa&rdquo; &ldquo;horse&rdquo; is (perhaps) &ldquo;ponoka-imit&aacute;&aacute;&rdquo;).  Multiple morphemes within a single word are separated by a dash (&ldquo;-&rdquo;).  A distinction between affixes and clitics (e.g., by using the equals sign (&ldquo;=&rdquo;)) is not currently supported.  It is a good idea to use the spelling conventions of the morphemes already present in the BLD whenever possible.  One benefit of doing so is that these morphemes will become links to their entries when viewing the form.  By convention, enter &ldquo;???&rdquo; if a morpheme cannot be identified.  <a href='help.php#morphbreak' title='view &ldquo;morphbreak&rdquo; section of Help pages'>More...</a></p></div>";
					}
					else if(divID=="morphgloss_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('morphgloss_help')>X</a><b>Morpheme Gloss Field.</b>  The morpheme gloss field should contain a gloss (translation) for each morpheme identified in the mopheme break field.  It is a good idea to gloss a morpheme according to that morpheme&rsquo;s own morpheme gloss and not according to its translation.  For example, if the form &ldquo;amo&rdquo; has &ldquo;DEM&rdquo; as its morpheme gloss and &ldquo;this, proximity to speaker but not to addressee&rdquo; as its translation, it is better to use &ldquo;DEM&rdquo; to gloss &ldquo;amo&rdquo; when it appears as a morpheme in a larger form.  Morphemes that cannot be glossed by a single English word should be glossed with multiple words separated by periods not spaces (e.g., &ldquo;o'kaniksi&rdquo; is glossed as &ldquo;dead.branch&rdquo;). By convention, enter &ldquo;???&rdquo; if a morpheme&rsquo;s gloss cannot be identified.  <a href='help.php#morphgloss' title='view &ldquo;morphgloss&rdquo; section of Help pages'>More...</a></p></div>";
					}
					else if(divID=="translation_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('translation_help')>X</a><b>Translation Field (required).</b>  The translation field should contain the translation given to the form by the speaker (or, if the speaker translated from English to Blackfoot, the English utterance that the speaker translated).  Multiple translations should be separated by a semicolon &ldquo;;&rdquo;.  <a href='help.php#translation' title='view &ldquo;translation&rdquo; section of Help pages'>More...</a></p></div>";
					}
					else if(divID=="comments_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('comments_help')>X</a><b>General Comments Field.</b>  The general comments field is a general-purpose field to be used for noting such things as contextual factors, notable elicitation methods, interesting ideas inspired by the form, notable similarities and differences to other forms, etc.  Other Forms, Files and Collections can be referenced and within this field and links to those entities will automatically be created if the following syntax is used: &ldquo;form x&rdquo;, &ldquo;formid x&rdquo;, &ldquo;file x&rdquo;, &ldquo;fileid x&rdquo;, &ldquo;collection x&rdquo;, &ldquo;collectionid x&rdquo;, where &ldquo;x&rdquo; is a variable over id numerals.  For example, &ldquo;form 15446&rdquo;, when entered into the general comments field, will, when viewed after entry, will be an active link to form 15446. Comments made by the speaker should be entered into the speaker&rsquo;s comments field.  <a href='help.php#comments' title='view &ldquo;general comments&rdquo; section of Help pages'>More...</a></p></div>";
					}
					else if(divID=="scomments_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('scomments_help')>X</a><b>Speaker&rsquo;s Comments Field.</b>The speaker&rsquo;s comments field should be used to enter quotes or paraphrases of comments that the speaker has made about the form that she has produced or judged.  <a href='help.php#scomments' title='view &ldquo;speaker&rsquo;s comments&rdquo; section of Help pages'>More...</a></p></div>";
					}
					else if(divID=="method_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('method_help')>X</a><b>Elicitation Method Field.</b> The elicitation method field is where one can record the way in which a form was elicited.  Often it is informative to know whether the speaker translated from English to Blackfoot, offered a form spontaneously, judged the grammaticality of a form that the speaker uttered, or was telling a story.  The options in the elicitation method field are mutually exclusive and are entered via a &ldquo;select box&rdquo; in order to facilitate quicker data entry and consistency.  BLD users can view, edit and delete the elicitation methods and their descriptions at the <a href='elicitation_method.php' title='click here to view, add and update elicitation methods'>Elicitation Methods</a> page. However, it is advised that users carefully consider the consequences of changing the elicitation methods as doing so may result in forms being tagged with outdated elicitation methods and searching efficacy may be compromised.  <a href='help.php#method' title='view &ldquo;elicitation method&rdquo; section of Help pages'>More...</a></p></div>";												
					}			
					else if(divID=="speaker_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('speaker_help')>X</a><b>Speaker Field.</b> The speaker field is where one enters the name of the person who spoke or judged the Blackfoot utterance.  (The terms &ldquo;speaker&rdquo; and &ldquo;consultant&rdquo; are used interchangably in the BLD.)  The speaker list in the &ldquo;select box&rdquo; can be viewed at the <a href='people.php'>People</a> page where new speakers can be added and the details of currently listed speakers edited.  <a href='help.php#speaker' title='view &ldquo;speaker&rdquo; section of Help pages'>More...</a></p></div>";												
					}		
					else if(divID=="elicitor_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('elicitor_help')>X</a><b>Elicitor Field.</b> The elicitor field is where one enters the name of the researcher who was working with the speaker when the form was uttered or judged.  The list of elicitors is coextensive with the list of members of the BLD.  If there were multiple researchers present at the time of elicitation, one should be chosen as primary or a group entity elicitor may be used such as the UBC Blackfoot Group.  <a href='help.php#elicitor' title='view &ldquo;elicitor&rdquo; section of Help pages'>More...</a></p></div>";												
					}		
					else if(divID=="source_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('source_help')>X</a><b>Source Field.</b> The source field is where a textual source should be credited if the form was taken from such a source.  Current convention is to enter the author(s) last name(s) followed by the year of publication. <a href='help.php#source' title='view &ldquo;source&rdquo; section of Help pages'>More...</a></p></div>";												
					}		
					else if(divID=="verifier_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('verifier_help')>X</a><b>Verifier Field.</b> The verifier field is where one may enter the name of a researcher who has verified the accuracy of the form as entered.  This field may be useful in cases where an elicitor is developing his proficiency with the language or where two elicitors have retrieved essentially the same form and adding a near-duplicate entry would be superfluous. As with the elicitor field, the list of available verifiers is coextensive with the list of BLD members. <a href='help.php#verifier' title='view &ldquo;verifier&rdquo; section of Help pages'>More...</a></p></div>";									
					}																					
					else if(divID=="dateelicited_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('dateelicited_help')>X</a><b>Date Elicited Field.</b> The date elicited field is for entering the date when the form in question was elicited.  Dates are entered and DD-MM-YYYY format.  The three &ldquo;select boxes&rdquo; automatically have the current date as first choice so keyboard users can simply press the down arrow at each box if the data entry is occuring on the same date as the elicitation. <a href='help.php#dateelicited' title='view &ldquo;date elicited&rdquo; section of Help pages'>More...</a></p></div>";									
					}
					else if(divID=="keywords_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('keywords_help')>X</a><b>Keywords Field.</b> The keywords field contains tags that categorize the form as relevant to a particular focus of linguistic inquiry.  For example, forms could be tagged with the following keywords: &ldquo;multiple wh-question&rdquo;, &ldquo;noun incorporation&rdquo;, &ldquo;cross-clausal agreement&rdquo;. BLD users can go to the <a href='keywords.php' title='click here to view, edit and add keywords'>Keywords Page</a> to view, edit and add to the list of available keywords.  Once new keywords are added there they instantly become available for entry on the Add Form and Update Form pages. Click on the &ldquo;view keyword options&rdquo; link and a list of available keywords will appear.  Multiple keywords may be assigned to a single form. <a href='help.php#keywords' title='view &ldquo;keywords&rdquo; section of Help pages'>More...</a></p></div>";									
					}
					else if(divID=="syncat_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('syncat_help')>X</a><b>Morpho-syntactic Category Field.</b> The morpho-syntactic category field is useful for categorizing words and morphemes according to their syntactic role.  As with the elicitation method field, the options for morpho-syntactic category are predetermined by a list that is editable by users of the BLD. Click <a href='syncat.php' title='view, edit and add to the morpho-syntactic categories'>here</a> to view, edit or add to that list. At present, those categories used by Frantz & Russell (1989, 1995) (e.g., vai, vii, vti, vta, nan, nin, nar, nir, adt, vrt, med, fin, und, etc.) are employed in the BLD. <a href='help.php#syncat' title='view &ldquo;morpho-syntactic category&rdquo; section of Help pages'>More...</a></p></div>";									
					}
					else if(divID=="grammaticality_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><p style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('grammaticality_help')>X</a><b>Grammaticality Judgment Field.</b> The grammaticality judgment field is where one may indicate the acceptability of the form as judged by the speaker.  The default value is &ldquo;grammatical&rdquo;.  At present, the other options are &ldquo;ungrammatical&rdquo;, &ldquo;questionable&rdquo; and &ldquo;infelicitous&rdquo;. Users SHOULD NOT enter indicators of grammaticality (such as &ldquo;*&rdquo;, &ldquo;?&rdquo; and &ldquo;#&rdquo;) into the forms field. When the forms are viewed after entry the symbols corresponding to the grammaticality judgment are automatically prefixed to the form by the BLD system. <a href='help.php#grammaticality' title='view &ldquo;grammaticality judgment&rdquo; section of Help pages'>More...</a></p></div>";					
					}					
					else if(divID=="search_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('search_help')>X</a><p><b>Searching.</b> To search the BLD, enter a search term in one or both of the two text boxes labeled &ldquo;Search for:&rdquo;, choose the type of search you want to perform (as a phrase, all of these, any of these, as a regular expression, exactly) and choose which field you want your search term to match in (all fields, form, translation, etc.). If you enter a search term in both fields, you can require that both terms match (&ldquo;AND&rdquo;), that one of the search terms match (&ldquo;OR&rdquo;) or that the first term match but not the second (&ldquo;NOT&rdquo;).</p><p>The underscore symbol <a class='warning'>&ldquo;_&rdquo;</a> is a wildcard that means something like &ldquo;everything&rdquo;.  If you enter the underscore in one of the search term fields and press &ldquo;Search&ldquo; you will get every form that is in the BLD.  If you enter the underscore and enter a restrictor, for example a restriction to forms elicited by yourself, you will get all forms in the BLD elicited by yourself. Get more info on searching in the <a href='help.php#search' title='view &ldquo;search&rdquo; section of Help pages'>Help Pages</a>.</p></div></div>";					
					}
					else if(divID=="mysql_query_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('mysql_query_help')>X</a><p><b>MYSQL Query.</b> Mysql is the database management system (DBMS) that the BLD is built upon.  A query is a way of asking the DBMS to do something.  The select query that you see when you click &ldquo;Show Mysql Query&rdquo; is a way of asking the DBMS to give us a specific set of forms from the database table called &ldquo;linguistic_forms&rdquo; which is, you guessed it, where the linguistic forms are stored.  By viewing the Mysql query (whose syntax should be pretty transparent for anyone who speaks English and is somewhat familiar with basic logic and bracketing conventions) you can see whether the search you entered on the Search Page is doing what you want it to do.</p></div></div>";				
					}												
					else if(divID=="restrictors_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('restrictors_help')>X</a><p><b>Restrictors.</b> Restrictors allow you to add customized conditions on your search.  You can require, for example, that your results be restricted to those where certain fields, like speaker comments, are not empty; or to those that are not from a certain textual source; or to those that were elicited by a certain researcher; or to those that were entered before, on or after a given date; or to those that are or are not associated to files.  Combining your search terms with restrictors can help you narrow down your results to just what you want.</p><p>Remember, if you enter the underscore &ldquo;<span class='warning'>_</span>&rdquo; in one of the search term fields and add one or more restrictors you can perform a search built exclusively on restrictors. <a href='help.php#restrictors' title='more info on restrictors'>More...</a></p></div></div>";				
					}
					else if(divID=="orderings_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('orderings_help')>X</a><p><b>Orderings.</b> Orderings allow you to determine the order in which your results are displayed.  The default is to order results by form in ascending alphabetical order.  One quirk of using the numerals &ldquo;1&rdquo;, &ldquo;2&rdquo; and &ldquo;3&rdquo; to represent accented characters is that words beginning with such characters will be listed first since numerals precede alphabetic characters in the mysql way of doing things. <a href='help.php#orderings' title='more info on orderings'>More...</a></p></div></div>";				
					}
					else if(divID=="past_searches_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('past_searches_help')>X</a><p><b>Past Searches.</b> By clicking on &ldquo;past searches&rdquo; you can view the last twenty searches that you entered during your current session.  If you then click on the mysql query link of one of the searches (begins with &ldquo;select * from linguistic forms where ...&rdquo;) you will be taken to the &ldquo;Search Forms&rdquo; page and all the past search details will be pre-entered for you.  You may then press &ldquo;Search&rdquo; immediately to repeat the search exactly or you may modify the search before pressing &ldquo;Search&rdquo;.</p></div></div>";				
					}				
					else if(divID=="quicksearch_help")
					{
						content = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'><div style='background-color:white;border: 1px solid black;margin:10px;padding:10px;'><a style='position:relative;float:right;border:1px solid #d0232a;padding:2px;' href='#' title='close this window' onclick=display_help_box('quicksearch_help')>X</a><p><b>Quicksearch.</b> Quicksearch allows you to search without going to a new browser window.  Just enter your search term in the text input box and the system searches the BLD as you type.  Every time you hit a key on your keyboard, the system searches the database for the string of characters that you have entered so far.</p><p><b>Bf-En.</b> When the radio button &ldquo;Bf-En&rdquo; is selected a Blackfoot to English search is performed.  What is happening in actuality is the system is searching for an exact match of the string you have entered in the forms field.  This means that if you entered &ldquo;dogs&rdquo;, you will only get a result if the database contains an entry where the &ldquo;dogs&rdquo; is exactly what is in the forms column.</p><p><b>En-Bf.</b> When the radio button &ldquo;En-Bf&rdquo; is selected an English to Blackfoot search is performed.  In this case, the system searches for the string you have entered as a word, i.e., it searches for all translations that contain your search string (i) surrounded by spaces, (ii) preceded by nothing and followed by a space, (iii) preceded by nothing and followed by nothing, or (iv) preceded by a space and followed by nothing.</div></div>";				
					}																			
					document.getElementById(divID).innerHTML = content;
				}
				else
				{
					document.getElementById(divID).innerHTML = '';	
				}
			}
			
			function confirmMethodDelete(methodID)			{				var r=confirm("To proceed with deleting this Elicitation Method press OK.\nOtherwise press Cancel.");				if (r==true)  				{					location="elicitation_method.php?delete=yes&methodid=" + methodID;				}			}
			
			function confirmSyncatDelete(syncatID)			{				var r=confirm("To proceed with deleting this Morpho-syntactic Category press OK.\nOtherwise press Cancel.");				if (r==true)  				{					location="syncat.php?delete=yes&syncatid=" + syncatID;				}			}
	
			function confirmKeywordDelete(keywordID)			{				var r=confirm("To proceed with deleting this Keyword press OK.\nOtherwise press Cancel.");				if (r==true)  				{					location="keyword.php?delete=yes&keywordid=" + keywordID;				}			}
			
			function showKeywordCheckboxes()			
			{
				var visibleKeywords = document.getElementById("view_keywords_div").style.visibility;
				//var viewKeywordsArrow = document.getElementById("view_keywords_arrow");
				if (visibleKeywords=="hidden")
				{
					document.getElementById("view_keywords_div").style.visibility = "visible";	
					document.getElementById("view_keywords_div").style.position = "static";
		      		//viewKeywordsArrow.setAttribute("src", "icons/arrow_down_transp.png");
					document.getElementById("view_keywords_link").innerHTML = "<img src='icons/arrow_down_transp.png' alt='right arrow' />hide keywords options";
				}
				else
				{
					document.getElementById("view_keywords_div").style.visibility = "hidden";
					document.getElementById("view_keywords_div").style.position = "fixed";		
		      		//viewKeywordsArrow.setAttribute("src", "icons/arrow_right_transp.png");
					document.getElementById("view_keywords_link").innerHTML = "<img src='icons/arrow_right_transp.png' alt='right arrow' />view keywords options";
				}
			}

			function showSearchRestrictors()			
			{
				var visibleRestrictors = document.getElementById("restrictor_div").style.visibility;
				if (visibleRestrictors=="hidden")
				{
					document.getElementById("restrictor_div").style.visibility = "visible";	
					document.getElementById("restrictor_div").style.position = "static";
					document.getElementById("restrictor_div_link").innerHTML = "<img src='icons/arrow_down_transp.png' alt='right arrow' />Hide Restrictors";
				}
				else
				{
					document.getElementById("restrictor_div").style.visibility = "hidden";
					document.getElementById("restrictor_div").style.position = "fixed";		
					document.getElementById("restrictor_div_link").innerHTML = "<img src='icons/arrow_right_transp.png' alt='right arrow' />Show Restrictors";
				}
			}			
			
			function showSearchOrderings()			
			{
				var visibleOrderings = document.getElementById("orderings_div").style.visibility;
				if (visibleOrderings=="hidden")
				{
					document.getElementById("orderings_div").style.visibility = "visible";	
					document.getElementById("orderings_div").style.position = "static";
					document.getElementById("orderings_div_link").innerHTML = "<img src='icons/arrow_down_transp.png' alt='right arrow' />Hide Orderings";
				}
				else
				{
					document.getElementById("orderings_div").style.visibility = "hidden";
					document.getElementById("orderings_div").style.position = "fixed";		
					document.getElementById("orderings_div_link").innerHTML = "<img src='icons/arrow_right_transp.png' alt='right arrow' />Show Orderings";
				}
			}
			
			function showCuriousQuery()			
			{
				var visibleCuriousQuery = document.getElementById("query_for_the_curious_div").style.visibility;
				if (visibleCuriousQuery=="hidden")
				{
					document.getElementById("query_for_the_curious_div").style.visibility = "visible";	
					document.getElementById("query_for_the_curious_div").style.position = "static";
					document.getElementById("query_for_the_curious_div_link").innerHTML = "<img src='icons/arrow_down_transp.png' alt='down arrow' />Hide Mysql Query";
				}
				else
				{
					document.getElementById("query_for_the_curious_div").style.visibility = "hidden";
					document.getElementById("query_for_the_curious_div").style.position = "fixed";		
					document.getElementById("query_for_the_curious_div_link").innerHTML = "<img src='icons/arrow_right_transp.png' alt='right arrow' />Show Mysql Query";
				}
			}			
	
			function showPastSearches()			
			{
				var visiblePastSearches = document.getElementById("past_searches_div").style.visibility;
				if (visiblePastSearches=="hidden")
				{
					document.getElementById("past_searches_div").style.visibility = "visible";	
					document.getElementById("past_searches_div").style.position = "static";
					document.getElementById("past_searches_link").innerHTML = "<img src='icons/arrow_down_transp.png' alt='down arrow' />Hide Past Searches";
				}
				else
				{
					document.getElementById("past_searches_div").style.visibility = "hidden";
					document.getElementById("past_searches_div").style.position = "fixed";		
					document.getElementById("past_searches_link").innerHTML = "<img src='icons/arrow_right_transp.png' alt='right arrow' />Show Past Searches";
				}
			}		
			function toggleFormat()
			{
				var formatSelect = document.export_form.format.selectedIndex;
				//document.getElementById("tab_vs_line").style.visibility = "hidden";
				//document.getElementById("fields_and_labels_options").style.visibility = "hidden";
				//var formatSelect = document.getElementById("format_select").innerHTML;	
				//alert("format select is " + formatSelect);
				if(formatSelect==0) // TXT
				{
					document.getElementById("tab_vs_line").style.visibility = "hidden";
					document.getElementById("tab_vs_line").style.position = "fixed";
					document.getElementById("fields_and_labels_options").style.visibility = "visible";
					document.getElementById("fields_and_labels_options").style.position = "static";	
					document.getElementById("bullets_options").style.visibility = "hidden"
					document.getElementById("bullets_options").style.position = "fixed"				
				}
				else if(formatSelect==1)	// LaTeX
				{
					document.getElementById("tab_vs_line").style.visibility = "visible";
					document.getElementById("tab_vs_line").style.position = "static";				
					document.getElementById("fields_and_labels_options").style.visibility = "visible";
					document.getElementById("fields_and_labels_options").style.position = "static";
					document.getElementById("bullets_options").style.visibility = "hidden"
					document.getElementById("bullets_options").style.position = "fixed"				
				}
				
			}
			
			function toggleStyle()
			{
				var styleSelect = document.export_form.sel_tab_vs_line.selectedIndex;
				//document.getElementById("tab_vs_line").style.visibility = "hidden";
				//document.getElementById("fields_and_labels_options").style.visibility = "hidden";
				//var formatSelect = document.getElementById("format_select").innerHTML;	
				//alert("style select is " + styleSelect);
				if(styleSelect==0) // Line
				{
					document.getElementById("tab_vs_line").style.visibility = "visible";
					document.getElementById("tab_vs_line").style.position = "static";			
					document.getElementById("fields_and_labels_options").style.visibility = "visible";
					document.getElementById("fields_and_labels_options").style.position = "static";
					document.getElementById("bullets_options").style.visibility = "hidden"
					document.getElementById("bullets_options").style.position = "fixed"		
				}
				else if(styleSelect==1)	// Tab (Covington)
				{
					document.getElementById("tab_vs_line").style.visibility = "visible";
					document.getElementById("tab_vs_line").style.position = "static";			
					document.getElementById("fields_and_labels_options").style.visibility = "hidden";
					document.getElementById("fields_and_labels_options").style.position = "fixed";
					document.getElementById("bullets_options").style.visibility = "visible"
					document.getElementById("bullets_options").style.position = "static"			
				}
				
			}
			function getGlossesG()			
			{
				var morphemeBreakLine = document.getElementById("morphbreak").value;					
				morphemeBreakLine.replace(/i/g, "THISWASAN_I");
				var content = morphemeBreakLine;
				document.getElementById("morphbreak_help").innerHTML = "<div style='position:fixed;width:500px;min-height:10px;background-color:#cccccc;top:0px;left:0px;border: 1px solid black;'>" + content + "</div>";
			}
			;
			
			
		//-->