<HTML>
<HEAD>
<TITLE>Insert table</TITLE>

<STYLE TYPE="text/css">
 td,body { font-family:Arial; font-size:9pt; font-weight:bold; } 
</STYLE>

<script>
function comprova_valors() 
{ 
	var nf, nc, at, ac, tit, nerr=0 , avis;

	avis = 'Table canīt be created due to:';
	nf = document.info_table.NumRows.value;
	nc = document.info_table.NumCols.value;
	at = "border=" + document.info_table.TableAttrs.value;
	ac = document.info_table.CellAttrs.value;
	tit = document.info_table.Caption.value;

	if( nf != parseInt(nf) || nf < 0 ) {
		nerr++;
		avis += '-The number of rows must be a positive integer.';
	}
	if( nc != parseInt(nc) || nc < 0 ) {
		nerr++;
		avis += '-The number of columns must be a positive integer.';
	}
	if( nerr == 0) {
		opener.inserta_table(nf,nc,at,ac,tit);
		window.close(); 
	}
	else { 
		alert(avis);
	}
	return true;
}
</script>

</HEAD>
<BODY bgcolor=white >

<center>
<form name=info_table onsubmit="comprova_valors();" >
	<input type="hidden" name="CellAttrs" value="">
	<input type="hidden" name="Caption" value="">
	<font color=black face=arial size=-1 ><b> Give values for the parameters and press OK:</b></font>

	<table cellspacing="10">
	<tr>	<td valign=absmiddle >Rows:   <input type=text size=3  maxlength=2 name=NumRows value=3 ></td>
		<td valign=absmiddle >Columns:   <input type=text size=3 maxlength=2 name=NumCols value=3></td>
	</tr>
	<tr>	<td>Borader Size/Width:</td>
		<td valign=absmiddle ><INPUT TYPE=TEXT SIZE=4 NAME=TableAttrs maxlength=4 value="1" cellPadding=1 cellSpacing=1 width=75%></td>
	</tr>

	<tr>	<td valign=absmiddle colspan=2 align=center ><INPUT TYPE=BUTTON NAME=OK VALUE=OK onclick="comprova_valors()" ></td>
	</tr>
	</table>
</form>
</center>

</body>
</html>
