The GetDisplayHeight method gets the height of the screen area available to your app in pixels.
This excludes the notification bar area at the top of the screen (if it's visible).
app.GetDisplayHeight();
Example
function OnStart()
{
height = app.GetDisplayHeight();
app.ShowPopup( height );
}