a JavaScript template most like smarty