<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="Custom gadget" 
      author="Google"
      author_email="visualization.api@gmail.com"
      description="Custom gadget"
      thumbnail="http://visapi-gadgets.googlecode.com/svn/trunk/image/thumbnail.png" 
      screenshot="http://visapi-gadgets.googlecode.com/svn/trunk/image/screenshot.png">
    <!--<Require feature="idi" />-->
    <!--<Require feature="locked-domain" />  -->
  </ModulePrefs>
  <Content type="html">
  <![CDATA[
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
   
    google.load('visualization', '1', {packages: ['table']});
    google.setOnLoadCallback(init);

    function init() {
      drawTable();
    }

    function drawTable() {
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Name');
      data.addColumn('number', 'Salary');
      data.addColumn('boolean', 'Full Time');
      data.addRows(5);
      data.setCell(0, 0, 'John');
      data.setCell(0, 1, 10000, '$10,000');
      data.setCell(0, 2, true);
      data.setCell(1, 0, 'Mary');
      data.setCell(1, 1, 25000, '$25,000');
      data.setCell(1, 2, true);
      data.setCell(2, 0, 'Steve');
      data.setCell(2, 1, 8000, '$8,000');
      data.setCell(2, 2, false);
      data.setCell(3, 0, 'Ellen');
      data.setCell(3, 1, 20000, '$20,000');
      data.setCell(3, 2, true);
      data.setCell(4, 0, 'Mike');
      data.setCell(4, 1, 12000, '$12,000');
      data.setCell(4, 2, false);

      var table = new google.visualization.Table(document.getElementById('table_div'));
      table.draw(data, {showRowNumber: true});

      google.visualization.events.addListener(table, 'select', function() {
	var row = table.getSelection()[0].row;
	alert('You selected ' + data.getValue(row, 0));
      });
  }	

  </script>
  <div id="table_div">
    <img src="http://visapi-gadgets.googlecode.com/svn/trunk/image/spinner.gif" />
  </div>
  
  ]]>
 </Content>
</Module>