anchor.diff:  
   <script>
   /// AJAX
  +function getCriteriaNumber(){
  +	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;
  +	
  +}
  +function subjectCriteriaNumber(){
  +	if(document.getElementById("SubjectOption").value=='N')
  +		return 0
  +	else if(document.getElementById("SubjectOption").value=='Identifier')
  +		return 1
  +	}
  +	
  +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 4}
  +	else return 2
  +	}
  +	
  +
  +
  +
   var registrationAutocompleterProps = {
       basename: "registration",
       populator: function(autocompleter, text) {
  -	registrationDetails.matchRegistrations(text, function(values) {
  +	registrationDetails.matchRegistrations(text,getCriteriaNumber(),function(values) {
   	    autocompleter.setChoices(values)
   	})
       },
       valueSelector: function(obj) {
  -    return obj.registrationStatus
  +    if(document.getElementById("select").value=='Subject')
  +    { 
  +    	return obj.participant.lastName;
  +    
  +    }else if (document.getElementById("select").value=='Study')
  +    {
  +    	if (document.getElementById("StudyOption").value=='shortTitle')
  +    	return obj.studySite.study.shortTitleText
  +    	else if (document.getElementById("StudyOption").value=='longTitle')
  +    	return obj.studySite.study.longTitleText
  +    	else if (document.getElementById("StudyOption").value=='status')
  +    	return obj.studySite.study.status
  +    	else return obj.studySite.study.shortTitleText
  +    	
  +    }else if (document.getElementById("select").value=='Id') 
  +    {
  +     return obj.studySite.study.status
  +    }
  +    
       }
   }
   
  
positive.code: 	},
  	indicator: mode.basename + "-indicator"
      })
      Event.observe(mode.basename + "-clear", "click", function() {
  	$(mode.basename + "-selected").hide()
  	$(mode.basename).value = ""
  	$(mode.basename + "-input").value = ""
  
negative.code:     updateSelectedDisplay(registrationAutocompleterProps)
     // Element.update("flow-next", "Continue &raquo;")
  })
  function updateAction(action){
  		document.getElementById("_updateaction").value=action;
  		document.getElementById("form1").submit();
  }
  function manageSelectBox(box){
  	if(box.value=='Subject'){
  