local function W(W,h)ResultString.Text=string.upper(W)if h and h>0 then local W=math.floor(h/60)local U=math.floor(h%60)if U<10 then U="\048"..tostring(U)end ResultTime.Text=string.upper("\087\073\078\078\073\078\071 \084\073\077\069\058 "..(tostring(W)..("\058"..tostring(U))))else ResultTime.Text=""end dlg.Visible=true wait(DISPLAY_DURATION)dlg.Visible=false end

local function openDlg(resultString, resultTime)
	-- Display result string
	ResultString.Text = string.upper(resultString)
	
	-- Display result time if > 0 (formatted)
	if resultTime and resultTime > 0 then
		local minutes = math.floor(resultTime/60)
		local seconds = math.floor(resultTime%60)
		if seconds < 10 then seconds = "0"..tostring(seconds)	end
		ResultTime.Text = string.upper("WINNING TIME: "..tostring(minutes)..":"..tostring(seconds))
	else
		ResultTime.Text = ""
	end
	
	dlg.Visible = true
	
	wait(DISPLAY_DURATION)
	
	dlg.Visible = false
end -- openDlg()
