Index: index.php
===================================================================
--- index.php	(revision 6178)
+++ index.php	(working copy)
@@ -20,7 +21,12 @@
 	<div id="contactList" class="box" style="left:10px;top:150px;display:none;">
 		<div class="bar" onmousedown="init_drag(event, 'contactList')" id="nick">licqweb</div>
 		<div id="contacts"></div>
-		<div id="ownerStatus"></div>
+		<div style="display:box;height:18px">
+		 <div id="ownerStatus"></div>
+		 <div class="resizer" onmousedown="init_resize(event, 'contacts', 100, 100)">
+		    <img class="resizerImage" src="images/resizer.png" />
+		 </div>
+		</div>
 	</div>
 	<div id="statusMenu"></div>
 	<div id="windows"></div>
Index: licqweb.js
===================================================================
--- licqweb.js	(revision 6178)
+++ licqweb.js	(working copy)
@@ -168,7 +168,7 @@
 			} else {
 				pp = contact.pp.toLowerCase();
 			}
-			var imgsrc = "images/" + pp + "." + contact.status.toLowerCase() + ".png";
+			var imgsrc = "images/" + pp + "." + contact.status.toLowerCase().replace(" ","") + ".png";
 			if (parseInt(contact.nummsgs) > 0) {
 				uclass = "newmessage";
 				imgsrc = "images/msg.png";
@@ -205,14 +205,15 @@
 
 function getWindowHtml(id, pp, nick) {
 	var key = id + '-' + pp;
-	return "<div class=\"window\" style=\"left:300px;top:150px\" id=\"" + key + "-w\">" +
+	return "<div onClick=\"set_focus(event, '" + key + "')\" class=\"window\" style=\"left:300px;top:150px\" id=\"" + key + "-w\">" +
 				"<div onmousedown=\"init_drag(event, '" + key + "-w')\" class=\"bar\">" +
 					"<div class=\"wintitle\">" + nick + " (" + pp + ")</div>" +
 					"<div onclick=\"showContactWindow('" + id + "', '" + pp + "')\" class=\"close\">[close]</div>" +
 				"</div>" +
 				"<div class=\"convo\" id=\"" + key + "-txt\"></div>" + 
-				"<div class=\"msginput\"><textarea id=\"" + key + "-input\" onKeyPress=\"textarea_keypress(event, '" + id + "', '" + pp + "')\"></textarea><br>" +
+				"<div class=\"msginput\"><textarea id=\"" + key + "-input\" onKeyPress=\"textarea_keypress(event, '" + id + "', '" + pp + "')\" ></textarea><br>" +
 					"<input type=\"submit\" class=\"button\" value=\"Send\" onclick=\"sendMessage('" + id + "', '" + pp + "'); return false\" />" +
+					"<div class=\"resizer\" onmousedown=\"init_resize(event, '" + key + "-txt', 150, 50)\"><img class=\"resizerImage\" src=\"images/resizerMsg.png\" /></div>" +
 				"</div>" +
 			"</div>";
 }
@@ -315,7 +316,7 @@
 			document.getElementById(key + '-i').src = "images/msg.png";
 		} else {
 			document.getElementById(key + '-s').className = contacts[pp][id].status;
-			document.getElementById(key + '-i').src = "images/" + pp.toLowerCase() + "." + contacts[pp][id].status.toLowerCase() + '.png';
+			document.getElementById(key + '-i').src = "images/" + pp.toLowerCase() + "." + contacts[pp][id].status.toLowerCase().replace(" ","") + '.png';
 		}
 	} else {
 	}
@@ -340,7 +341,7 @@
 function _updateOwners() {
 	var statushtml = "";
 	for (var pp in owners) {
-		statushtml += "<img onclick=\"showSelectStatus(event, '" + owners[pp].id + "', '" + pp + "'); return false\" src=\"images/" + pp.toLowerCase() + "." + owners[pp].status.toLowerCase() + ".png\"/> ";
+		statushtml += "<img onclick=\"showSelectStatus(event, '" + owners[pp].id + "', '" + pp + "'); return false\" src=\"images/" + pp.toLowerCase() + "." + owners[pp].status.toLowerCase().replace(" ","") + ".png\"/> ";
 	}
 	document.getElementById('ownerStatus').innerHTML = statushtml;
 }
@@ -352,7 +353,7 @@
 	statuss["MSN"] = new Array('Online', 'Away', 'Occupied');
 	var statushtml = "";
 	for (var i = 0; i < statuss[pp].length; ++i) {
-		statushtml += "<div onclick=\"changeStatus('" + pp + "', '" + statuss[pp][i] + "')\"><img src=\"images/" + pp.toLowerCase() + "." + statuss[pp][i].toLowerCase() + ".png\">" + statuss[pp][i] + "</div>";
+		statushtml += "<div onclick=\"changeStatus('" + pp + "', '" + statuss[pp][i] + "')\"><img src=\"images/" + pp.toLowerCase() + "." + statuss[pp][i].toLowerCase().replace(" ","") + ".png\">" + statuss[pp][i] + "</div>";
 	}
 	statusMenu.innerHTML = statushtml;
 	statusMenu.style.left = e.pageX;
@@ -460,10 +461,8 @@
 dragwin.zIndex = 0;
 
 function init_drag(event, id) {
-	var el;
-	var x, y;
 
-	dragwin.win = document.getElementById(id);
+   dragwin.win = document.getElementById(id);
 
 	dragwin.startX = event.clientX + window.scrollX;
 	dragwin.startY = event.clientY + window.scrollY;
@@ -494,3 +493,65 @@
 	document.removeEventListener("mousemove", start_drag, true);
 	document.removeEventListener("mouseup", stop_drag, true);
 }
+
+function set_focus(event, key){
+   win = document.getElementById(key + "-w");
+   win.style.zIndex = ++dragwin.zIndex;
+   event.preventDefault();
+   
+   input = document.getElementById(key + "-input");
+   input.focus();
+   
+   //stop_propagate(event);
+}
+
+function stop_propagate(event){
+   if (!event) var event = window.event;
+	event.cancelBubble = true;
+	if (event.stopPropagation) event.stopPropagation();
+}
+
+/* Window resizing stuff */
+var resizewin = new Object();
+
+function init_resize(event, id, minW, minH) {
+	resizewin.win = document.getElementById(id);
+	resizewin.minW = minW;
+	resizewin.minH = minH;
+
+	resizewin.startX = event.clientX + window.scrollX;
+	resizewin.startY = event.clientY + window.scrollY;
+	resizewin.startWidth = parseInt(resizewin.win.style.width, 10);
+	resizewin.startHeight = parseInt(resizewin.win.style.height,  10);
+
+	if (isNaN(resizewin.startWidth)) resizewin.startWidth = resizewin.win.offsetWidth;
+	if (isNaN(resizewin.startHeight)) resizewin.startHeight = resizewin.win.offsetHeight;
+
+	//resizewin.win.style.zIndex = ++resizewin.zIndex;
+
+	document.addEventListener("mousemove", do_resize, true);
+	document.addEventListener("mouseup", stop_resize, true);
+	event.preventDefault();
+}
+
+function do_resize(event) {
+	var x, y;
+	x = event.clientX + window.scrollX;
+	y = event.clientY + window.scrollY;
+
+	
+	if(resizewin.minW < (resizewin.startWidth + x - resizewin.startX)){
+	  resizewin.win.style.width = (resizewin.startWidth + x - resizewin.startX) + "px";
+	  resizewin.win.parentNode.style.width = (resizewin.startWidth + x - resizewin.startX) + "px";
+	}
+   if(resizewin.minH < (resizewin.startHeight + y - resizewin.startY)){
+	  resizewin.win.style.height = (resizewin.startHeight + y - resizewin.startY) + "px";
+   }
+	
+	event.preventDefault();
+}
+
+function stop_resize(event) {
+	document.removeEventListener("mousemove", do_resize, true);
+	document.removeEventListener("mouseup", stop_resize, true);
+}
\ No newline at end of file
Index: licqweb.css
===================================================================
--- licqweb.css	(revision 6178)
+++ licqweb.css	(working copy)
@@ -108,6 +108,26 @@
 	left: 300px;
 }
 
+#ownerStatus {
+   left:0px;
+   width:20px;
+   position:absolute;
+}
+
+.resizer {
+   right:0px;
+   bottom:0px;
+   width:18px;
+   height:18px;
+   position:absolute;
+}
+
+.resizerImage {
+   bottom:0px;
+   position:absolute;
+   right:0px;
+}
+
 .box {
 	background-color: #eee;
 	border: 1px solid #000000;