docs: function(node)
  	{
  		var ds = mxUtils.getDocumentSize();
  		var left = parseInt(node.offsetLeft);
  		var width = parseInt(node.offsetWidth);
  			
  		var offset = mxUtils.getDocumentScrollOrigin(node.ownerDocument);
  		var sl = offset.x;
  		var st = offset.y;
  
  		var b = document.body;
  		var d = document.documentElement;
  		var right = (sl) + ds.width;
  		
  		if (left + width > right)
  		{
  			node.style.left = Math.max(sl, right - width) + 'px';
  		}
  		
  		var top = parseInt(node.offsetTop);
  		var height = parseInt(node.offsetHeight);
  		
  		var bottom = st + ds.height;
  		
  		if (top + height > bottom)
  		{
  			node.style.top = Math.max(st, bottom - height) + 'px';
  		}
  	}