void LLPanelObjectTools::onGetTopScripts()
{
	LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
	if(!instance) return;
	
	if (gAgent.isGodlike()) 
	{
		LLFloaterReg::showInstance("top_objects");
		LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
		instance->onRefresh();
	}
}
// static 
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
{
	LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
	if(!instance) return;
	// Make sure dialog is on screen
	LLFloaterReg::showInstance("top_objects");
	instance->handleReply(msg, data);

	//HACK: for some reason sometimes top scripts originally comes back
	//with no results even though they're there
	if (!instance->mObjectListIDs.size() && !instance->mInitialized)
	{
		instance->onRefresh();
		instance->mInitialized = TRUE;
	}

}