xmsgbox set to fixed position and Template function

Template function modified to accept more general data