
.namespace s09_HotSpot

function OnActivate()
	
	OPLog.Log("onactivate "..self.Name)
	-- if self.Name == "back_s09" then
		-- NavigationManager.SwitchTo(nil,"s08_SearchSite")	
	-- end
	if self.Name == "horloge" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_911",nil,nil)
	end	
	if self.Name == "porte_s10" and SampleLevel.IsEqual("s10_firstenter",true) then
		NavigationManager.SwitchTo(nil,"s09_c02")
		elseif self.Name == "porte_s10" and SampleLevel.IsEqual("s10_firstenter",false) then
		PlaySoundEffect("gmp_opendoor")
		NavigationManager.SwitchTo(nil,"s10_SearchSite")
		-- elseif self.Name == "porte_s10" and (SampleLevel.IsEqual("s09_search_1","unstarted") or SampleLevel.IsEqual("s09_search_1","started")) then
		-- SequencePlayer.Enabled = true
		-- SequencePlayer.PlaySequence("GP_912",nil,nil)
	end	

	if self.Name == "sonnette_area" then
		NavigationManager.SwitchTo(nil,"s09_c01")
	end	
	if self.Name == "OpenWanted1" then	
		PlaySoundEffect("gmp_grabpaper")
		DocumentManager.OpenDocument("media/graph/documents/avis_de_recherche_"..DebugOptions.curlanguage..".PNG","avis_de_recherche","none")
	end
end

function OnEnable()
	AreaHotspot.OnEnable()
	--self.firstclick = true
	OPLog.Log("mon onenable "..self.Name)
end


function GetSpecificCursor()
-- if	self.Name == "back_s09" then
		-- return 4,"s08"
if  self.Name == "sonnette_area" then
		return 5
		elseif  self.Name == "horloge" then
		return 1
		elseif  self.Name == "porte_s10" then
		return 4,"s10"
		elseif  self.Name == "OpenWanted1" then
		return 1
		else
		return CURSOR_AREA_HOTSPOT
	end
end
function OnDropObject()
	return false
end