

(function() { // START OF PREVENT GLOBAL VARIABLES

// START MENU STUFF
// START MENU STUFF

//---------------------------------------------------------
/*
Initialize the menu.

*/
function fnInitMenu()
{
/*
Instantiate a MenuBar:  The first argument passed to the 
constructor is the id of the element in the page 
representing the MenuBar; the second is an object literal 
of configuration properties.
*/
var oMenuBar = new YAHOO.widget.MenuBar("mymenu",
	{
	autosubmenudisplay: true, 
	hidedelay: 750, 
	lazyload: true
	}
	);

/*
Call the "render" method with no arguments since the 
markup for this MenuBar instance is already exists in 
the page.
*/
oMenuBar.render();
}

/* moved due to YUI loader use
/*
Initialize and render the MenuBar when its elements are ready 
to be scripted.
*8/
YAHOO.util.Event.onContentReady("mymenu", fnInitMenu); 
*/

// END MENU STUFF
// END MENU STUFF






/*REPLACED>>
//---------------------------------------------------------
function initPageJs()
{
*/

MYCOMPANY.initPageJs = function()
	{



/*
// START TAB
// START TAB
var tabView = new YAHOO.widget.TabView('demo');

//YAHOO.log("The example has finished loading; as you interact with it, you'll see log messages appearing here.", "info", "example");

// END TAB
// END TAB


// init rich text editor
var myEditor = new YAHOO.widget.Editor('msgpost', { 
    height: '300px', 
    width: '522px', 
    dompath: true, //Turns on the bar at the bottom 
    animate: true //Animates the opening, closing and moving of Editor windows 
}); 
myEditor.render(); 
*/
};







/*
//window.onload = initPageJs
//YAHOO.util.Event.addListener(window, "load", initPageJs);
YAHOO.util.Event.onDOMReady(initPageJs);
*/



// yui loader code
//---------------------------------------------------------
/*
The function to call when all script/css resources have been loaded
via YUI Loader process.

This is the callback function; you can use
this space to call all of your instantiation
logic for the components you just loaded.
*/
function fnHandleYuiLoaderSuccessful()
{

/*
Initialize and render the MenuBar when its elements are ready 
to be scripted.
*/

YAHOO.util.Event.onContentReady("mymenu", fnInitMenu); 

// END MENU
// END MENU

//YAHOO.util.Event.onDOMReady(initPageJs);
YAHOO.util.Event.onDOMReady(MYCOMPANY.initPageJs);
}

//window.onload = initPageJs
//YAHOO.util.Event.addListener(window, "load", initPageJs);
//YAHOO.util.Event.onDOMReady(initPageJs);


// Instantiate and configure Loader:
var loader = new YAHOO.util.YUILoader({

    // Identify the components you want to load.  Loader will automatically identify
    // any additional dependencies required for the specified components.
    require: [
//    	"grids",
//    	"fonts",
//    	"reset",
//    	"base",

		//"animation",
		//"autocmplete",
		"button",
    	"calendar",
		"charts",
		"colorpicker",
		"connection",
		//"cookie",
		//rollup>>"containercore",
		"container",
    	"datasource",
    	"datatable",
		//"dom",
		//"dragdrop",
    	"editor",
    	"element",
    	//"event",
    	//"history",
    	//"imageloader",
    	//"imagecropper",
    	"json",
    	"logger",
    	"menu",
    	"selector",
    	//rollup>>"simpleeditor",
    	//"slider",
    	"tabview",
    	//"treeview",
    	//"uploader",
    	"yahoo"
    	],

    // Configure loader to pull in optional dependencies.  For example, animation
    // is an optional dependency for slider.
    loadOptional: true,

    // The function to call when all script/css resources have been loaded
    onSuccess: fnHandleYuiLoaderSuccessful
});

// Load the files using the insert() method. The insert method takes an optional
// configuration object, and in this case we have configured everything in
// the constructor, so we don't need to pass anything to insert().
loader.insert();


})(); // END OF PREVENT GLOBAL VARIABLES

