anchor.diff:  <!--Removes commas and percentage signs from a string-->
   function removeCommasOrPercentage(metricString) {
       var metricValueAsNumber;
  -    	if(metricString.indexOf(',') != -1){  			
  -  			metricValueAsNumber= metricString.replace(/,/g,'');  			
  -		}else if(metricString.indexOf('%') != -1){
  -			metricValueAsNumber = (metricString.replace(/%/g,'')) * 100 ;
  -		}else{
  -			metricValueAsNumber = metricString;
  +    	if (metricString != 0 ){
  +    	  if(metricString.indexOf(',') != -1){  			
  +  			  metricValueAsNumber= metricString.replace(/,/g,'');  			
  +		  }else if(metricString.indexOf('%') != -1){
  +			  metricValueAsNumber = (metricString.replace(/%/g,'')) * 100 ;
  +		  }else{
  +			  metricValueAsNumber = metricString;
  +		  }
   		}
      
       return metricValueAsNumber;
  
positive.code:  		shortName = document.getElementById("truncName" + [i]).innerHTML;
   		//retrieves the metric value
   		var metricValue = document.getElementById(metric + [i]).innerHTML;
   		//calculates the bar graph width 
   		var barWidth = removeCommasOrPercentage(metricValue) * scale; 		
   		//creates a span id to use to retrieve the project bar width
  
negative.code: 	<!--Loop through all the snapshots and if the project id = the resource id then set the snapshot id variable -->
  	<% for @Snapshot in snapshots %>
  	<% if (@Project.id == @Snapshot.project_id)%>
  	<% snapshotId = @Snapshot.id %>
  		
  	<!--Retrieve each project's points, coverage, rules compliance and documented api measures and display them in the project comparison table-->
  	
  	<!--points value-->
       <% myPoints = ProjectMeasure.find(:all, :conditions =>{:metric_id => pointsMetric, :snapshot_id => snapshotId})%>
       <% if (myPoints.blank? || myPoints == nil)%>
        <td id ="pointsValue" class="pointsValue" align="right" nowrap="">-</td>
       <% else %>
          <% pointsValue = number_with_delimiter(myPoints[0].value.to_i, :delimiter => ',') %>
  	    <td id ="pointsValue" class="pointsValue" align="right" nowrap=""><%= pointsValue -%></td>
       <% end %>
  	
  	<!--coverage value-->	
  	<% myCoverage = ProjectMeasure.find(:all, :conditions =>{:metric_id => coverageMetric, :snapshot_id => snapshotId}) %>
       <% if (myCoverage.blank? || myCoverage == nil)%>
        <td id = "coverageValue" align="right" nowrap=""><%= @ProjectMeasure.value -%>%</td>
       <% else %>
        <td id = "coverageValue" align="right" nowrap=""><%= myCoverage[0].value-%>%</td>
       <% end %>	
  	  	
  	<!--rules compliance value -->
  	<% myRules =  ProjectMeasure.find(:all, :conditions =>{:metric_id => rulesComplianceMetric, :snapshot_id => snapshotId}) %>		
  	  <% if (myRules.blank? || myRules == nil)%>
  	     <td align="right" id = "rulesValue" nowrap="">-</td>	  		    
  	  <% else %>
  	    <td align="right" id = "rulesValue" nowrap=""><%= myRules[0].value-%>%</td>	    
  	 <% end %>
  		
  	<!--documented API value -->
  	<% myDocApi =  ProjectMeasure.find(:all, :conditions =>{:metric_id => docApiMetric, :snapshot_id => snapshotId}) %>	
        <% if (myDocApi.blank? || myDocApi == nil) %>
  	    <td align="right" id ="docApiValue" nowrap="" >-</td> 	  	    
  	  <% else %>
  	   <td align="right" id ="docApiValue" nowrap="" ><%= myDocApi[0].value-%>%</td>
  	  <% end %>
  	  
  	</tr>
  
  <% end %>
  <% end %>
  <% end %>
  