html += "<tr>"; 
html += "<tr class=\"table-head\">"; 
function insertTable() {	var formObj = document.forms[0];	var inst = tinyMCE.selectedInstance;	var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className;	var html = '';	var elm = tinyMCE.tableElm;	var cellLimit, rowLimit, colLimit;	tinyMCEPopup.restoreSelection();	// Get form data	cols = formObj.elements['cols'].value;	rows = formObj.elements['rows'].value;	border = formObj.elements['border'].value != "" ? formObj.elements['border'].value  : 0;	cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";	cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";	align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;	width = formObj.elements['width'].value;	height = formObj.elements['height'].value;	bordercolor = formObj.elements['bordercolor'].value;	bgcolor = formObj.elements['bgcolor'].value;	className = "wiki-table";	id = formObj.elements['id'].value;	summary = formObj.elements['summary'].value;	style = formObj.elements['style'].value;	dir = formObj.elements['dir'].value;	lang = formObj.elements['lang'].value;	background = formObj.elements['backgroundimage'].value;	cellLimit = tinyMCE.getParam('table_cell_limit', false);	rowLimit = tinyMCE.getParam('table_row_limit', false);	colLimit = tinyMCE.getParam('table_col_limit', false);	// Validate table size	if (colLimit && cols > colLimit) {		alert(tinyMCE.getLang('lang_table_col_limit', '', true, {cols : colLimit}));		return false;	} else if (rowLimit && rows > rowLimit) {		alert(tinyMCE.getLang('lang_table_row_limit', '', true, {rows : rowLimit}));		return false;	} else if (cellLimit && cols * rows > cellLimit) {		alert(tinyMCE.getLang('lang_table_cell_limit', '', true, {cells : cellLimit}));		return false;	}	// Update table	if (action == "update") {		inst.execCommand('mceBeginUndoLevel');		tinyMCE.setAttrib(elm, 'cellPadding', cellpadding, true);		tinyMCE.setAttrib(elm, 'cellSpacing', cellspacing, true);		tinyMCE.setAttrib(elm, 'border', border, true);		tinyMCE.setAttrib(elm, 'align', align);		tinyMCE.setAttrib(elm, 'class', className);		tinyMCE.setAttrib(elm, 'style', style);		tinyMCE.setAttrib(elm, 'id', id);		tinyMCE.setAttrib(elm, 'summary', summary);		tinyMCE.setAttrib(elm, 'dir', dir);		tinyMCE.setAttrib(elm, 'lang', lang);		// Not inline styles		if (!tinyMCE.getParam("inline_styles"))			tinyMCE.setAttrib(elm, 'width', width, true);		// Remove these since they are not valid XHTML		tinyMCE.setAttrib(elm, 'borderColor', '');		tinyMCE.setAttrib(elm, 'bgColor', '');		tinyMCE.setAttrib(elm, 'background', '');		tinyMCE.setAttrib(elm, 'height', '');		if (background != '')			elm.style.backgroundImage = "url('" + background + "')";		else			elm.style.backgroundImage = '';		if (tinyMCE.getParam("inline_styles"))			elm.style.borderWidth = border + "px";		if (tinyMCE.getParam("inline_styles")) {			if (width != '')				elm.style.width = getCSSSize(width);		}		if (bordercolor != "") {			elm.style.borderColor = bordercolor;			elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;			elm.style.borderWidth = border == "" ? "1px" : border;		} else			elm.style.borderColor = '';		elm.style.backgroundColor = bgcolor;		elm.style.height = getCSSSize(height);		tinyMCE.handleVisualAid(tinyMCE.tableElm, false, inst.visualAid, inst);		// Fix for stange MSIE align bug		tinyMCE.tableElm.outerHTML = tinyMCE.tableElm.outerHTML;		tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);		tinyMCE.triggerNodeChange();		inst.execCommand('mceEndUndoLevel');		// Repaint if dimensions changed		if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)			inst.repaint();		tinyMCEPopup.close();		return true;	}	// Create new table	html += "<table class=\"wiki-table\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";                for (var y=0; y < rows; y++) {                    if (y == 0 ) {                        html += "<tr>";                        for (var x=0; x < cols; x++)                            html += '<td>&nbsp;</td>';                        html += "</tr>";                    } else {                        html += "<tr>";                        for (var x=0; x < cols; x++)                            html += '<td>&nbsp;</td>';                        html += "</tr>";                    }                }	html += "</table>";	inst.execCommand('mceBeginUndoLevel');	inst.execCommand('mceInsertContent', false, html);	tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual']);	inst.execCommand('mceEndUndoLevel');	tinyMCEPopup.close();}
6184	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6184/6ffb01286985b11413d780a5593d7f5b717d52f8/table.js/clean/xwiki-platform-web/standard/src/main/webapp/tiny_mce/plugins/table/jscripts/table.js