var xaml = "<Ellipse Canvas.Left='X' Canvas.Top='Y' Fill='Red' Width='4' Height='4' />";
var msg = "You clicked at x,y.";


function clicked(sender, args)
{
  var host = sender.getHost();
  var ellipse = host.createFromXaml(xaml.replace("X",args.X).replace("Y",args.Y));
  host.findName("debug").Text = msg.replace("x",args.X).replace("y",args.Y);
  host.findName("root").children.add(ellipse);
}

function handleParseError(line, col, hr, string)
{
	alert(string + " at: " + line + ", " + col);
}