
tuio.connector.add('npTuioClient', {
	init: function() {
		var failmsg = "Unable to initialize npTuioClient plugin.";
		var id = "__tuiojs_connector_npTuioClient";
		var el = document.getElementById(id);
		if (el == undefined) {
			var el = document.createElement('object');
			el.setAttribute('id', id);
			el.setAttribute('type', 'application/x-tuio');
			el.appendChild(document.createTextNode(failmsg));
			document.body.appendChild(el);
		}

		// TODO: check if the plugin can be loaded. 
		//       if so, hide the plugin (display:none).
	}
});

function tuio_callback(type, sid, fid, x, y, angle)  {
	tuio.callback(type, sid, fid, x, y, angle);
}


@@ -36,42 +36,17 @@
  %7B%0A%09
-init: function() %7B%0A%09%09var 
+_
 failmsg
- =
+:
  %22Un
@@ -89,20 +89,15 @@
 in.%22
-;%0A%09%09var id =
+,%0A%09_id:
  %22__
@@ -126,17 +126,38 @@
 oClient%22
-;
+,%0A%0A%09init: function() %7B
 %0A%09%09var e
@@ -184,16 +184,22 @@
 entById(
+this._
 id);%0A%09%09i
@@ -291,16 +291,22 @@
 e('id', 
+this._
 id);%0A%09%09%09
@@ -394,16 +394,22 @@
 extNode(
+this._
 failmsg)
@@ -497,16 +497,16 @@
 oaded. %0A
-
 %09%09//    
@@ -547,16 +547,154 @@
 :none).%0A
+%09%7D,%0A%0A%09shutdown: function() %7B%0A%09%09var el = document.getElementById(this._id);%0A%09%09if (el != undefined) %7B%0A%09%09%09document.body.removeChild(el);%0A%09%09%7D%0A
 %09%7D%0A%7D);%0A%0A

Add shutdown() to npTuioClient connector