/**
 *  Copyright (C) 2009 Orbeon, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify it under the terms of the
 *  GNU Lesser General Public License as published by the Free Software Foundation; either version
 *  2.1 of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *  See the GNU Lesser General Public License for more details.
 *
 *  The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
 */
YAHOO.namespace("xbl.fr");
YAHOO.xbl.fr.FusionCharts = function() {};
ORBEON.xforms.XBL.declareClass(YAHOO.xbl.fr.FusionCharts, "xbl-fr-fusion-charts");
YAHOO.xbl.fr.FusionCharts.prototype = {

    xmlSpan: null,
    xml: null,
    fusionChart: null,

    init: function() {
        // Get information from the DOM
        var chartDiv = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-chart-div", null, this.container)[0];
        this.xmlSpan = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-xml", null, this.container)[0];
        var uriToSwfElement = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-uri-to-swf", null, this.container)[0];
        var uriToSwf = ORBEON.xforms.Document.getValue(uriToSwfElement.id);
        var swfElement = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-swf", null, this.container)[0];
        var swf = ORBEON.xforms.Document.getValue(swfElement.id);
        var widthElement = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-width", null, this.container)[0];
        var width = ORBEON.xforms.Document.getValue(widthElement.id);
        var heightElement = YAHOO.util.Dom.getElementsByClassName("xbl-fr-fusion-charts-height", null, this.container)[0];
        var height = ORBEON.xforms.Document.getValue(heightElement.id);

        var pathToSwf = ORBEON.xforms.Globals.resourcesBaseURL + uriToSwf + "/" + swf + ".swf?registerWithJS=1";
        this.fusionChart = new FusionCharts(pathToSwf, this.container.id + "-fusion", width, height, "0", "0");

        this.updateChart();
        this.fusionChart.render(chartDiv.id);
        ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(function() { this.updateChart(); }, this, true);
    },

    updateChart: function() {
        var newXML = ORBEON.xforms.Document.getValue(this.xmlSpan.id);
        if (newXML != this.xml) {
            this.xml = newXML;
            this.fusionChart.setDataXML(this.xml);
        }
    }
};

@@ -1973,17 +1973,16 @@
 nt.id);%0A
-%0A
         
@@ -1985,25 +1985,32 @@
     var 
-pathToSwf
+resourcesBaseURL
  = ORBEO
@@ -2042,16 +2042,109 @@
 sBaseURL
+%5BORBEON.xforms.Controls.getForm(this.container).id%5D;%0A        var pathToSwf = resourcesBaseURL
  + uriTo

Fix [ #315570 ] Fusion Charts XBL: cannot find swf files