Index: trunk/expressoMail1_2/js/rich_text_editor.js
===================================================================
--- trunk/expressoMail1_2/js/rich_text_editor.js	(revision 320)
+++ trunk/expressoMail1_2/js/rich_text_editor.js	(revision 329)
@@ -319,10 +319,11 @@
 cRichTextEditor.prototype.insertTableHtml = function (){
 	var id = this.editor.substr(5); // border_id
-	var	rows = document.getElementById('rows').selectedIndex;
-	var	cols = document.getElementById('cols').selectedIndex;
-	var insertTable = '<table border="1px"><tbody>';
-	for (var i = 0; i <= rows; i++){
+	var	rows = document.getElementById('rows').value;
+	var	cols = document.getElementById('cols').value;
+	var border = document.getElementById('border').value;
+	var insertTable = '<table border="'+border+'px"><tbody>';
+	for (var i = 0; i < rows; i++){
 		insertTable += "<tr>";	
-		for (var j = 0; j <= cols; j++)
+		for (var j = 0; j < cols; j++)
 			insertTable += "<td>&nbsp;</td>";	
 		insertTable += "</tr>";
@@ -352,33 +353,30 @@
 		form_table.style.top = "5px";
 		form_table.style.left = "5px";
-		form_table.style.width = "170px";
-		form_table.style.height = "120px";
-		form_table.name = get_lang("Insert Table");
-		form_table.innerHTML = get_lang('Select the table size')+':<br><br>'+
-								get_lang('Rows')+':&nbsp;&nbsp;&nbsp;'+	get_lang('Cols')+':<br>'+
-									'<select name="rows" id="rows"><option value="1">1</option>'+
-									'<option value="2">2</option>'+
-									'<option value="3">3</option>'+
-									'<option value="4">4</option>'+
-									'<option value="5">5</option>'+
-									'<option value="6">6</option>'+
-									'<option value="7">7</option>'+
-									'<option value="8">8</option>'+
-									'<option value="9">9</option></select>&nbsp;&nbsp;&nbsp;'+
-									'<select name="cols" id="cols"><option value="1">1</option>'+
-									'<option value="2">2</option>'+
-									'<option value="3">3</option>'+
-									'<option value="4">4</option>'+
-									'<option value="5">5</option>'+
-									'<option value="6">6</option>'+
-									'<option value="7">7</option>'+
-									'<option value="8">8</option>'+
-									'<option value="9">9</option></select><br><br>'+
-  								'<input title="Close"  value="' + get_lang('Close') + '" type="button" onclick="win.close()">&nbsp;'+
-								'<input title="Include"  value="' + get_lang('Include') + '" type="button" onclick="RichTextEditor.insertTableHtml();win.close();">';
+		form_table.style.width = "190px";
+		form_table.style.height = "90px";
+		form_table.name = get_lang("Insert Table");		
+		form_table.innerHTML = get_lang('Select the table size')+':<br><br><table cellspacing="0"><tbody><tr><td align="center">'+
+								get_lang('Rows')+':</td><td></td><td align="center">'+get_lang('Cols')+':</td><td></td><td align="center">'+get_lang('Border')+':</td></tr>'+
+									'<tr><td align="right"><input type="text" readonly="true" id="rows" size="2" maxlength="2" value="1"></input></td><td align="left"><img src="templates/default/images/plus.png" onclick="javascript:RichTextEditor.incrementField(\'rows\');"></img><br><img src="templates/default/images/minus.png" onclick="javascript:RichTextEditor.decrementField(\'rows\');"></img></td>'+
+									'<td align="right"><input type="text" readonly="true" id="cols" size="2" maxlength="2" value="1"></input></td><td align="left"><img src="templates/default/images/plus.png" onclick="javascript:RichTextEditor.incrementField(\'cols\');"></img><br><img src="templates/default/images/minus.png" onclick="javascript:RichTextEditor.decrementField(\'cols\');"></img></td>'+
+									'<td align="right"><input type="text" readonly="true" id="border" size="2" maxlength="2" value="1"></input></td><td align="left"><img src="templates/default/images/plus.png" onclick="javascript:RichTextEditor.incrementField(\'border\');"></img><br><img src="templates/default/images/minus.png" onclick="javascript:RichTextEditor.decrementField(\'border\');"></img></td>'+
+									'</tr></tbody></table>'+
+	  								'&nbsp;&nbsp;&nbsp;<input title="Close"  value="' + get_lang('Close') + '" type="button" onclick="win.close()">&nbsp;'+
+									'<input title="Include"  value="' + get_lang('Include') + '" type="button" onclick="RichTextEditor.insertTableHtml();win.close();">';	
 		form.appendChild(form_table);
 		
 		this.showWindow(form);
 		}
+
+cRichTextEditor.prototype.incrementField = function(id_val){
+	var field_text = document.getElementById(id_val);
+	field_text.value = parseInt(field_text.value)+1;
+}
+
+cRichTextEditor.prototype.decrementField = function(id_val){
+	var field_text = document.getElementById(id_val);
+	if (parseInt(field_text.value) > 0)
+		field_text.value = parseInt(field_text.value)-1;
+}
 
 cRichTextEditor.prototype.createImage = function(){
