manialink argument is your ML pages and id is a string that'll avoid doubles, if a loaded layers has the same ID, it'll get destroyed. the function will return you the layer object that has just been created. it can be useful to retrieve maniascript handler and local page object. localpage is the class that will makes you able to retrieve ML element and modify them like element position, color etc. maniascript handler is where all MS related things will be, like time, pendingEvents etc... Be carful with pending events because "yield();" will empty pending events so be careful with it.