Index: dbx-2.01-formatted.js
===================================================================
--- dbx-2.01-formatted.js	(revision 3)
+++ dbx-2.01-formatted.js	(working copy)
@@ -1,4 +1,4 @@
-// DBX2.01 :: Docking Boxes (dbx)
+// DBX2.05 :: Docking Boxes (dbx)
 // *****************************************************
 // DOM scripting by brothercake -- http://www.brothercake.com/
 // GNU Lesser General Public License -- http://www.gnu.org/licenses/lgpl.html
@@ -41,8 +41,10 @@
 			}
 		}
 	this.state = str.replace(/^(.+)&$/, '$1');
+	this.cookiestring = this.state.replace(/,/g, '|');
+	this.cookiestring = this.cookiestring.replace(/=/g, ':');
 	if (typeof this.onstatechange == 'undefined' || this.onstatechange()) {
-		document.cookie = 'dbx-' + this.sid + '=' + this.state + '; expires=' + now.toGMTString() + '; path=/';
+		document.cookie = 'dbx-' + this.sid + '=' + this.cookiestring + '; expires=' + now.toGMTString() + '; path=/';
 		}
 	};
 
@@ -50,10 +52,12 @@
 	this.cookiestate = null;
 	if (document.cookie) {
 		if (document.cookie.indexOf('dbx-' + this.sid) != -1) {
-			this.cookie = document.cookie.split('dbx-' + this.sid + '=')[1].split('&');
+			this.cookie = document.cookie.split('dbx-' + this.sid + '=')[1].split(';')[0].split('&');
 			for (var i in this.cookie) {
 				if (typeof this.cookie[i] != 'function') {
-					this.cookie[i] = this.cookie[i].split('=');
+					this.cookie[i] = this.cookie[i].replace(/\|/g, ',');
+					this.cookie[i] = this.cookie[i].replace(/:/g, '=');
+					this.cookie[i] = this.cookie[i].split('=');
 					this.cookie[i][1] = this.cookie[i][1].split(',');
 					}
 				}
@@ -186,7 +190,7 @@
 			for (i=0; i<num; i++) {
 				var index = parseInt(dbx.cookiestate[this.gid][i], 10);
 				this.container.insertBefore(this.boxes[index], dummy);
-				if(this.toggles && dbx.cookiestate[this.gid][i].charAt(1) == '-') {
+				if (this.toggles && /\-$/.test(dbx.cookiestate[this.gid][i])) {
 					this.toggleBoxState(this.buttons[index], false);
 					}
 				}
@@ -210,6 +214,7 @@
 		}, false);
 	document[dbx.etype](dbx.eprefix + 'mousemove', function(e) {
 		self.mousemove(e);
+		return !self.dragok;
 		}, false);
 	document[dbx.etype](dbx.eprefix + 'mouseup', function(e) {
 		self.mouseup(e);
