		
	function makeTable(){
	
	r=jQuery('#rows').val()*1;
	c=jQuery('#cols').val()*1;
	
	if(c>5)
		{
			alert("Too many columns given!");
			return;
		}
	
	table='<p>Please fill in the respective entries. Enter \'[check]\' to display a checkbox. Use &lt;h6&gt; tags for headings. </p><table class="rm_table" border="1" width="100%">';
	table+='<tr>';
	
	classes=new Array('', 'features', 'plan-free', 'plan-basic', 'plan-plus', 'plan-max');
	for(i=1;i<=c;i++)
	{
		table+='<th id="t1' + i + '"><textarea id="text-1'+i+'"></textarea></th>';
	}
	
	table+='</tr>';
	
	classes[1]='feature'
	
	
	for(i=2;i<=r;i++)
	{	table+='<tr>';
	
		for(j=1;j<=c;j++)
		{
				table+='<td class="'+classes[j]+'"><textarea id="text-'+i+j+'"></textarea></td>';
		}
		
		table+='</tr>';
	}
	
	table+='</table><br /><a href="javascript:makeHTML();">Make HTML code</a><p>&nbsp;</p>';
	
	jQuery('#tablearea').html(table);
	
	}

	
	function makeHTML()
	{
		output='<p>Please copy and paste the following HTML in a page using the \'Pricing Table\' page template to create a pricing table.</p><textarea style="width:65%; height:300px" onclick="this.select()">\n';
		
		output+='<table cellpadding="0" cellspacing="0" id="subscribe-tbl">\n';
		output+='<tr>\n';
		
		classes[1]='features';
			for(i=1;i<=c;i++)
			{
				output+='<th id="' + classes[i] + '">'+jQuery("#text-1"+i).val()+'</th>\n';
			}
	
		output+='</tr>';
	
	
	classes[1]='feature'
	
			for(i=2;i<=r;i++)
			{	output+='<tr>';
	
				for(j=1;j<=c;j++)
				{		if(i!=r)
						{
							output+='<td class="'+classes[j]+'">'+jQuery("#text-"+i+j).val()+'</td>\n';
						output=output.replace('<td class="'+classes[j]+'">[check]</td>','<td class="'+classes[j]+' check">&amp;nbsp;</td>');
						}
						
						else
						{
							output+='<td class="end '+classes[j]+'">'+jQuery("#text-"+i+j).val()+'</td>\n';
						output=output.replace('<td class="end '+classes[j]+'">[check]</td>','<td class="end '+classes[j]+' check">&amp;nbsp;</td>');
						}
				}
		
				output+='</tr>\n';
			}
		
			output+='</table></textarea>\n<p>&nbsp;</p>';
			
		jQuery('#tablearea').html(output);
			
			
	}