Lua Panels are not Global and run in their own private environment so cannot see any functions that are declared within the screen load script, and equally anything that is declared in a panel cannot be seen by the GUI. But there is a simple way around this, when leaving the GUI editor a file called ScreenScript.lua is saved which is a copy of your screen load script. We simply load this into the panel giving it access to all the functions that were created there.
dofile(mc.mcCntlGetMachDir(0)..'\\ScreenScript.lua')
DazTheGas