def ofc2_inline(width, height, graph, id=Time.now.usec, flash_attributes = {}, flash_params = {})
      div_name = "flashcontent_#{id}"
      <<-EOF
        <div id="#{div_name}"></div>
        <script type="text/javascript">

          function #{div_name}_data(){
            return '#{graph.render}';
          };

          swfobject.embedSWF(
            '/assets/open-flash-chart.swf', '#{div_name}',
            '#{width}', '#{height}','9.0.0', '/assets/expressInstall.swf',
            {'get-data':'#{div_name}_data'}, #{flash_params.to_json}, #{flash_attributes.to_json} );

        </script>
      EOF
    end
def ofc2_inline(width, height, graph, id=Time.now.usec, flash_attributes = {}, flash_params = {})
      div_name = "flashcontent_#{id}"
      <<-EOF
        <div id="#{div_name}"></div>
        <script type="text/javascript">

          function #{div_name}_data(){
            return '#{graph.render}';
          };

          swfobject.embedSWF(
            '/assets/open-flash-chart.swf', '#{div_name}',
            '#{width}', '#{height}','9.0.0', '/assets/expressInstall.swf',
            {'get-data':'#{div_name}_data'}, #{flash_params.to_json}, #{flash_attributes.to_json} );

        </script>
      EOF
    end
generate a ofc object using Graph object, it's more handy than ofc2 method
  +width+ width for div
  +height+ height for div
  +graph+ a OFC2::Graph object
  +id+ id for div with graph, default Time.now.usec
  +flash_attributes+ attributes for swf
  +flash_params+ params for swf