<html>
<head>
<title>Insert table</title>

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

<script type="text/javascript">
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 action="||action||" name="info_table" method="post" 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="middle">Rows:   <input type="text" size="3"  maxlength="2" name="NumRows" value="3" /></td>
		<td valign="middle">Columns:   <input type="text" size="3" maxlength="2" name="NumCols" value="3" /></td>
	</tr>
	<tr>
		<td>Border Size/Width:</td>
		<td valign="middle"><input type="text" size="4" name="TableAttrs" maxlength="4" value="1" /></td>
	</tr>
	<tr>
		<td valign="middle" colspan="2" align="center"><input type="button" name="OK" value="OK" onclick="comprova_valors()" /></td>
	</tr>
	</table>
</form>
</center>

</body>
</html>
