//Called when application is created.   function OnStart() {          app.SetMenu( "Exit,Model,Display" );       app.EnableBackKey( false );       app.ShowPopup ( "Back key emulates Menu key" );  }   //Called when user selects a menu item.   function OnMenu( name ) {                if ( name == "Exit" ) app.Exit() ;      if ( name == "Model" ) app.ShowPopup( app.GetModel() );      if ( name == "Display" )      {         var s = app.GetDisplayWidth() + " x " + app.GetDisplayHeight();         app.ShowPopup( s );     } }   //Called when the back key is pressed.   function OnBack() {    app.ShowMenu();  }