anchor.diff:  						rank = scan.assignment
   						screen = 1
   //RECORD FUNCTIONS
  -			if("Search Records")
  -				var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null)  as text
  -				if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)))
  -					return
  -				Perp = new/list()
  -				t1 = lowertext(t1)
  -				var/list/components = text2list(t1, " ")
  -				if(components.len > 5)
  -					return //Lets not let them search too greedily.
  -				for(var/datum/data/record/R in data_core.general)
  -					var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + R.fields["rank"]
  -					for(var/i = 1, i<=components.len, i++)
  -						if(findtext(temptext,components[i]))
  -							var/prelist = new/list(2)
  -							prelist[1] = R
  -							Perp += prelist
  -				for(var/i = 1, i<=Perp.len, i+=2)
  -					for(var/datum/data/record/E in data_core.security)
  -						var/datum/data/record/R = Perp[i]
  -						if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
  -							Perp[i+1] = E
  -				tempname = t1
  -				screen = 4
  -
   			if("Record Maintenance")
   				screen = 2
   				active1 = null
  
positive.code: 						dat += "<B>Security Record Lost!</B><BR>"
  						dat += text("<A href='?src=\ref[];choice=New Record (Security)'>New Security Record</A><BR><BR>", src)
  					dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
  				if(4.0)
  					if(!Perp.len)
  						dat += text("ERROR.  String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
  					else
  						dat += {"
  <table style="text-align:center;" cellspacing="0" width="100%">
  <tr>					"}
  						dat += text("<th>Search Results for '[]':</th>", tempname)
  						dat += {"
  </tr>
  </table>
  <table style="text-align:center;" border="1" cellspacing="0" width="100%">
  <tr>
  <th>Name</th>
  <th>ID</th>
  <th>Rank</th>
  <th>Fingerprints</th>
  <th>Criminal Status</th>
  </tr>					"}
  						for(var/i=1, i<=Perp.len, i += 2)
  							var/crimstat = ""
  							var/datum/data/record/R = Perp[i]
  							if(istype(Perp[i+1],/datum/data/record/))
  								var/datum/data/record/E = Perp[i+1]
  								crimstat = E.fields["criminal"]
  							var/background
  							switch(crimstat)
  								if("*Arrest*")
  									background = "'background-color:#DC143C;'"
  								if("Incarcerated")
  									background = "'background-color:#CD853F;'"
  								if("Parolled")
  									background = "'background-color:#CD853F;'"
  								if("Discharged")
  									background = "'background-color:#3BB9FF;'"
  								if("None")
  									background = "'background-color:#00FF7F;'"
  								if("")
  									background = "'background-color:#FFFFFF;'"
  									crimstat = "No Record."
  							dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
  							dat += text("<td>[]</td>", R.fields["id"])
  							dat += text("<td>[]</td>", R.fields["rank"])
  							dat += text("<td>[]</td>", R.fields["fingerprint"])
  							dat += text("<td>[]</td></tr>", crimstat)
  						dat += "</table><hr width='75%' />"
  						dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
  				else
  		else
  			dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
  
negative.code: 		if (authenticated)
  			switch(screen)
  				if(1.0)
  
  					//body tag start + onload and onkeypress (onkeyup) javascript event calls
  					dat += "<body onload='selectTextField(); updateSearch();' onkeyup='updateSearch();'>"
  					//search bar javascript
  					dat += {"
  
  		<head>
  			<script src="libraries.min.js"></script>
  			<script type='text/javascript'>
  
  				function updateSearch(){
  					var filter_text = document.getElementById('filter');
  					var filter = filter_text.value.toLowerCase();
  
  					if(complete_list != null && complete_list != ""){
  						var mtbl = document.getElementById("maintable_data_archive");
  						mtbl.innerHTML = complete_list;
  					}
  
  					if(filter.value == ""){
  						return;
  					}else{
  						$("#maintable_data").children("tbody").children("tr").children("td").children("input").filter(function(index)
  						{
  							return $(this)\[0\].value.toLowerCase().indexOf(filter) == -1
  						}).parent("td").parent("tr").hide()
  					}
  				}
  
  				function selectTextField(){
  					var filter_text = document.getElementById('filter');
  					filter_text.focus();
  					filter_text.select();
  				}
  
  			</script>
  		</head>
  
  
  	"}
  					dat += {"
  <p style='text-align:center;'>"}
  					dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
  					//search bar
  					dat += {"
  						<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
  							<tr id='search_tr'>
  								<td align='center'>
  									<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'>
  								</td>
  							</tr>
  						</table>
  					"}
  					dat += {"
  </p>
  <table style="text-align:center;" cellspacing="0" width="100%">
  