Globals.Location  = new Object();
Globals.Location.ASHX  = new Object();
Globals.FirstTime = true; 
Globals.MainMenu = null;
Globals.BaseClientIncludePath = "./scripts/custom/";
Globals.Location.ASHX.Security 			= "ServerData/SecurityHandler.ashx";
Globals.Location.ASHX.File 				= "ServerData/FileHandler.ashx";
Globals.Location.ASHX.User 				= "ServerData/UserHandler.ashx";
Globals.Location.ASHX.Content			= "ServerData/ContentEditor.ashx";
Globals.Location.ASHX.PayPal			= "ServerData/PayPalHandler.ashx";
Globals.Location.ASHX.SendEmailFromForm	= "ServerData/SendEmailFromForm.ashx";

Globals.AppLayout = new Layout("main","scripts/custom/layout/template.html", false);
Globals.AppLayout.SetupCSS = function()
{
	/*Globals.AddCSS("./scripts/custom/layout/css/Global.css");     	
	Globals.AddCSS("./scripts/custom/layout/css/rte.css"); 				      
	Globals.AddCSS("./scripts/custom/layout/css/UIControls.css"); 				
	Globals.AddCSS("./scripts/custom/layout/css/grid.css"); 						
	Globals.AddCSS("./scripts/custom/layout/css/TabMenu.css"); 					
	Globals.AddCSS("./scripts/custom/layout/css/SiteStyles.css"); 					
	
    if(Globals.IsPreIE7())
    {
		Globals.AddCSS("./scripts/custom/layout/css/IE6Below.css");	
    }
    else
    {
		Globals.AddCSS("./scripts/custom/layout/css/NonIE6Below.css");	
    }
    */
}; 

Globals.SetupMainMenu = function()
{
	var index = -1; 
	if(Globals.MainMenu != null)
	{
    	index = Globals.MainMenu.SelectedIndex; 
	}
	
	Globals.MainMenu = new UIControls.TabMenu("MainToolbarId","ToolBar");
	Globals.MainMenu.AddItem("Home","GoToPage(Page.HomeBase);\nGlobals.MainMenu.SelectMenuItem(Page.HomeBase, true);\n");
	Globals.MainMenu.AddItem("Sushi Menu","GoToPage(Page.ContentPage,\"SushiMenu\");\nGlobals.MainMenu.SelectMenuItem(Page.SushiMenu, true);\n");	
	Globals.MainMenu.AddItem("Hibachi Menu","GoToPage(Page.ContentPage,\"HibachiMenu\");\nGlobals.MainMenu.SelectMenuItem(Page.HibachiMenu, true);\n");	
	Globals.MainMenu.AddItem("Locations","GoToPage(Page.ContentPage,\"Locations\");\nGlobals.MainMenu.SelectMenuItem(Page.Locations, true);\n");	
	//Globals.MainMenu.AddItem("Contact Us","GoToPage(Page.ContentPage,\"ContactUs\");Globals.MainMenu.SelectMenuItem(Page.ContactUs, true);\n");	
	Globals.MainMenu.Render(index);		
};

Globals.OneTimeInit = function()
{
	
	Layouts.AddDataBridgeURL("ArticleContent", Globals.BaseClientIncludePath + "layout/templates/databridge/ArticleContent.html"); 	
	Layouts.AddDataBridgeURL("HomeContent", Globals.BaseClientIncludePath + "layout/templates/databridge/HomeContent.html"); 	
	
	Layouts.AddURL("HomeBase", Globals.BaseClientIncludePath + "layout/templates/home.html", "HomeContent"); 	

	Layouts.LoadAllAsync();
};

//Any code that needs to be initialized after the layout is loaded
Globals.InitConfig = function()
{ 
	Globals.SetupMainMenu(); 
	
	if(Globals.FirstTime)
	{
		Globals.FirstTime = false; 
		Globals.OneTimeInit(); 
	}	
};

UserRoles.ADMIN 			= 0; 
UserRoles.VIEW_ALL_USERS 	= 1; 
UserRoles.MODIFY_ALL_USERS 	= 2; 
UserRoles.VIEW_ALL_SUBS 	= 3; 
UserRoles.MODIFY_ALL_SUBS 	= 4; 
UserRoles.EDIT_PAGE_CONTENT	= 5; 