@*   Xafari Framework version : 17.2.3011.1336   *@

@using System.Text

@model Xafari.Mvc.Controls.StartupNavigationItemCallbackHandler

@Html.DevExpress().Panel(settings =>
{
	settings.Name = "StartupNavigationItemCallbackHandler";
	settings.ClientVisible = false;

	MvcWindow currentRequestWindow = MvcWindow.CurrentRequestWindow;
	if ((currentRequestWindow != null) && currentRequestWindow.IsMain)
	{
		string viewQueryString = this.Model.GetViewQueryString();
		
		if (!string.IsNullOrEmpty(viewQueryString))
			settings.ClientSideEvents.Init = string.Format("function(s, e) {{ window.XAFCurrentQueryString = '{0}'; if(document.location.hash == '') {{  document.location.hash = '{0}';}} xafari.StartCheckQueryString('{1}'); }}", viewQueryString, Xafari.Mvc.Controls.StartupNavigationItemCallbackHandler.CallbackHandlerID);
		else
			settings.ClientSideEvents.Init = string.Format("function(s, e) {{xafari.StartCheckQueryString('{0}'); }}", Xafari.Mvc.Controls.StartupNavigationItemCallbackHandler.CallbackHandlerID);
	}
}).GetHtml()