anchor.diff:  	if(document.getElementById("select").value=='Subject')
   		return subjectCriteriaNumber();
   	else if(document.getElementById("select").value=='Study')
  +		{
   		return studyCriteriaNumber();
  +		}
   	else if(document.getElementById("select").value=='Id')
   		return 5;
   	
  
positive.code: 							</tr>
  
  							<tr>
  								<td colspan="2"><input type="hidden" id="registration" /> <form:input
  									id="registration-input" size="52" path="searchText" /> <tags:indicator
  									id="registration-indicator" />
  								<div id="registration-choices" class="autocomplete"></div>
  								<p id="registration-selected" style="display: none">You've
  
negative.code: 	}
  	
  function studyCriteriaNumber(){
  
  	if(document.getElementById("StudyOption").value=='shortTitle')
  		return 2
  	else if(document.getElementById("StudyOption").value=='longTitle')
  		return 3
  	else if(document.getElementById("StudyOption").value=='status')
  	{return 5}
  	else if(document.getElementById("StudyOption").value=='id')
  	{
  	return 4
  	}
  	}
  	
  var registrationAutocompleterProps = {
      basename: "registration",
      populator: function(autocompleter, text) {if (document.getElementById("select").value=="Study"){if(document.getElementById("StudyOption").value=='id') {
  	(registrationDetails.matchStudyIdentifiers(text,getCriteriaNumber(),function(values) {
  	    autocompleter.setChoices(values)
  	}))
      } else {
  	(registrationDetails.matchStudies(text,getCriteriaNumber(),function(values) {
  	    autocompleter.setChoices(values)
  	}))
      }}else if (document.getElementById("select").value=="Subject"){if(document.getElementById("SubjectOption").value=='Identifier') {
  	(registrationDetails.matchParticipantIdentifiers(text,getCriteriaNumber(),function(values) {
  	    autocompleter.setChoices(values)
  	}))
      } else {
  	(registrationDetails.matchParticipants(text,getCriteriaNumber(),function(values) {
  	    autocompleter.setChoices(values)
  	}))
      }}else {
  	(registrationDetails.matchRegistrationIdentifiers(text,getCriteriaNumber(),function(values) {
  	    autocompleter.setChoices(values)
  	}))
      }},
      valueSelector: function(obj) {
      if(document.getElementById("select").value=='Subject')
      { 
      	if(document.getElementById("SubjectOption").value=='N')
  		return obj.lastName
  		else if(document.getElementById("SubjectOption").value=='Identifier'){
  		return obj.value}
     }else if (document.getElementById("select").value=='Study')
      {
      	if (document.getElementById("StudyOption").value=='shortTitle')
      	return obj.shortTitleText
      	else if (document.getElementById("StudyOption").value=='longTitle')
      	return obj.longTitleText
      	else if (document.getElementById("StudyOption").value=='status')
      	return obj.status
      	else return obj.value
      	
      }else if (document.getElementById("select").value=='Id') 
      {
       return obj.value
      }
      
      }
  