Code:
<script>
function fred(id,rowCt,ct,cbl)
{
	var cols= new Array();
	cols[0]=50;
	cols[1]=300;
	cols[2]=600;
	var numCol=cols.length;
	
	var firstRow=10;
	var rowOffset=50;
	var lblOffset=25;
	
	var x,xl,y,c;	
	c=ct%numCol;
	x=cols[c];
	xl=x+lblOffset;
	y=rowOffset+(rowCt*rowOffset);

	id.style.position="absolute";
...