  function populateFacebookReviews( reviews ) {
	var reviewBox = document.getElementById( 'facebookReviews' );
	var divHeading = document.createElement ('div');
	divHeading.setAttribute('class', 'fbrevbg');
	divHeading.setAttribute('className', 'fbrevbg');
	  var div = document.createElement( 'div' );
	  div.setAttribute( 'class', 'facebookFriendsHeading' );
	  div.setAttribute( 'className', 'facebookFriendsHeading' );
	  
	  if( reviews.friendReviews ) {
	  	  div.innerHTML = '<img src="/img/home/txt_myfriendsreviews.gif" alt="My Friends\' Reviews" style="margin:0px 10px" />';
	  } else if (reviews.allReviews.length != 0) {
	  	  div.innerHTML = '<img src="/img/home/txt_facebookreviews.gif" alt="Facebook Reviews" style="margin:0px 10px" />';
	  }

	divHeading.appendChild (div);
	reviewBox.appendChild( divHeading );
	var table = document.createElement( 'table' );
	  table.setAttribute( 'cellPadding', '0' );
	  table.setAttribute( 'cellSpacing', '10' );
	  table.setAttribute( 'border', '0' );
	  table.setAttribute( 'width', '100%' );
	
	var maxReviews = reviews.allReviews.length;  
	if (reviews.allReviews.length > 2) {
	   maxReviews = 2;
	}

	if (maxReviews != 0) {
	 for( var counter=0; counter < maxReviews; counter++ ) {
  	  var row = table.insertRow( -1 );
	  var cellImage  = row.insertCell( -1 );
	  var cellText = row.insertCell( -1 );
		
	  var img = document.createElement( 'img' );
	  img.setAttribute( 'src', reviews.allReviews[counter].userProfileImage);
	  img.setAttribute( 'width', '50' );
	  img.setAttribute( 'height', '50' );
	  cellImage.appendChild( img );
	  cellImage.setAttribute( 'vAlign', 'top' );	
	  cellImage.setAttribute( 'width', '50' );

	  cellText.setAttribute( 'align', 'left' );	  
	  cellText.setAttribute( 'vAlign', 'top' );	
	  cellText.setAttribute( 'width', '100%' );
	  var firstSection = document.createElement ('div');
	  firstSection.setAttribute('class', 'fbfirstsection');
	  firstSection.setAttribute('className', 'fbfirstsection');
	  var consumerhref = document.createElement( 'a' );
	  consumerhref.setAttribute( 'href', '/consumerReviewsHistory.do?userId=' + 
	  	reviews.allReviews[counter].userID );
		  consumerhref.appendChild(document.createTextNode(reviews.allReviews[counter].userName));
	  var secondSection = document.createElement('div');
	  var reviewhref = document.createElement( 'a' );
	  reviewhref.setAttribute( 'href', '/r/' + reviews.allReviews[counter].reviewID );
	  reviewhref.appendChild(document.createTextNode('"' + reviews.allReviews[counter].title + '"'));

	  secondSection.appendChild(reviewhref);
	  secondSection.appendChild(document.createElement( 'br' ));
	  secondSection.appendChild(document.createTextNode( reviews.allReviews[counter].companyName ));
	  secondSection.appendChild(document.createElement( 'br' ));
		
	  firstSection.appendChild(document.createTextNode( 'by ' ));
	  firstSection.appendChild( consumerhref );	    


	  cellText.appendChild( secondSection );
	  cellText.appendChild( firstSection );
	  
	  }
	}
	  reviewBox.appendChild( table );
	  
  }

