Simple Javascript Templating functions