removing leading whitespaces/tab stops; replace jsmsg with displaymessage
fixing problem with pagetext (is now a "gloabl" variable)