//Called when application is started. function OnStart() {     var chk = app.LoadText("hash","unset");     var pass = prompt("Please enter password","");     if (pass==null) app.Exit();     var crypt = app.CreateCrypt();     var md5 = crypt.Hash( pass, "MD5" );     md5 = md5.substr(0,22);     if (chk == "unset") app.SaveText("hash", md5)     else if(chk != md5)     {         app.ShowPopup("Incorrect password");         app.Exit();     }       //Create a layout with objects vertically centered.     lay = app.CreateLayout( "linear", "VCenter,FillXY" );           //Create a text label and add it to layout.     txt = app.CreateText( "Welcome" );     txt.SetTextSize( 32 );     lay.AddChild( txt );          //Add layout to app.         app.AddLayout( lay ); }