anchor.diff:  				 displayRemoteInvestigator();
   		}
   
  -		if(${(command.id) gt 0} and not empty command.loginId){
  -			$('allowedToLogin-row').style.display='none';
  -		}
   
   		toggelUserName(${command.allowedToLogin});
  -		
  -		$('allowedToLogin').observe('click',function(evt){
  -			var element = Event.element(evt);
  -			toggelUserName(element.checked);
  +		var allowedLoginChkBox = $('allowedToLogin');
  +		if(allowedLoginChkBox){
  +			allowedLoginChkBox.observe('click',function(evt){
  +				var element = Event.element(evt);
  +				toggelUserName(element.checked);
   			});
  +		}
  +		
  +	
   		
   	});
   
  
positive.code: 		    <c:forEach begin="5" end="7" items="${fieldGroups.investigator.fields}" var="field">
                <tags:renderRow field="${field}" />
              </c:forEach>
              <tags:renderRow field="${fieldGroups.investigator.fields[8]}"/>
  		</div>
  		<br>
  		<br>
  
negative.code: 		}
  	}
  
  //---------------------------------------------------------------------
  //will show/hide the userName row.
  	function toggelUserName(checkBoxChecked){
  		if(checkBoxChecked){
  			$('loginId-row').show();
  			
  		}else{
  			$('loginId-row').hide();
  		}
  	}
  	
  