/**
 * WARNING! THIS IS A GENERATED FILE, AND WILL BE RE-GENERATED EACH TIME THE
 * AJAXBRIDGE IS RUN.
 *
 * You should keep your javascript code inside this file as light as possible, 
 * and rather keep the body of your Ajax application in separate *.js files. 
 *
 * Do make a backup of your changes, before re-generating this file (AjaxBridge 
 * will display a warning message to you).
 *
 * Please refer to the built-in documentation inside the AjaxBridge application 
 * for help on using this file.
 */
 
 
/**
 * Application "pbchart.mxml"
 */

/**
 * The "pbchart" javascript namespace. All the functions/variables you
 * have selected under the "pbchart.mxml" in the tree will be
 * available as static members of this namespace object.
 */
pbchart = {};


/**
 * Listen for the instantiation of the Flex application over the bridge
 */
FABridge.addInitializationCallback("b_pbchart", pbchartReady);


/**
 * Hook here all the code that must run as soon as the "pbchart" class
 * finishes its instantiation over the bridge.
 *
 * For basic tasks, such as running a Flex method on the click of a javascript
 * button, chances are that both Ajax and Flex may well have loaded before the 
 * user actually clicks the button.
 *
 * However, using the "pbchartReady()" is the safest way, as it will 
 * let Ajax know that involved Flex classes are available for use.
 */
function pbchartReady() {

	// Initialize the "root" object. This represents the actual 
	// "pbchart.mxml" flex application.
	b_pbchart_root = FABridge["b_pbchart"].root();
	

	// Global variables in the "pbchart.mxml" application (converted 
	// to getters and setters)

	// Global functions in the "pbchart.mxml" application

	pbchart.getNewStock = function(argString1, argString2) {
		b_pbchart_root.getNewStock(argString1, argString2);
	};

}
