// Declare a unique namespace.
var l5column = {};

// Class constructor. Parameter container is a DOM elementon the client that
// that will contain the visualization.
l5column.MyTable = function(container) {
  this.containerElement = container;
}

// Main drawing logic.
// Parameters:
//   data is data to display, type google.visualization.DataTable.
//   options is a name/value map of options. Our example takes one option.
l5column.MyTable.prototype.draw = function(column,label,data, options) {

  // Create an HTML table
  var showLineNumber = options.showLineNumber; // Boolean configuration option. 

  var html = [];
  html.push('<div class="art-Block">');  
  html.push('<div class="art-Block-body">');  
  html.push('<div class="art-BlockHeader">');  
  html.push('<div class="l"></div>');  
  html.push('<div class="r"></div> '); 
  html.push('<div class="t"><center>'+label+'</center></div>');  
  html.push('</div>');  
  html.push('<div class="art-BlockContent">');  
  html.push('<div class="art-PostContent">');  
  html.push('<img src="images/02.png" width="55px" height="55px" alt="an image" style="margin: 0 auto; display: block; border: 0" />');   
    var txt = ""; 
    for (var row = 1; row < data.getNumberOfRows(); row++) {
      txt = "<p>"+this.escapeHtml(data.getFormattedValue(row, column))+"</p>";
      
      html.push(txt);
      txt = "";
     
    }
 
  html.push('</div>');  
  html.push('</div> '); 
  html.push('</div>');  
  html.push('</div> '); 
  this.containerElement.innerHTML = html.join('');

}

// Utility function to escape HTML special characters
l5column.MyTable.prototype.escapeHtml = function(text) {
  if (text == null)
    return '';
  return text.replace(/&/g, '&').replace(/</g, '<')
      .replace(/>/g, '>').replace(/"/g, '"');
}
