function process() {
	
	// No errors
	self.onerror = null
	
	// Set Variables
	var rows = document.form.rows.value * 1
	var cols = document.form.cols.value * 1
	var width = document.form.width.value * 1
	var border = document.form.border.value * 1
	var cellpadding = document.form.cellpadding.value * 1
	var align = document.form.align.value
	var tdalign = document.form.tdalign.value
	
	var bgcolor = document.form.bgcolor.value
	if (bgcolor == "" || bgcolor == null) { bgcolor = "white" }
	
	var valign = document.form.valign.value
	
	// Table tag creation
	var table = "<table width=\"" + width + "\"\n"
	table += "       border=\"" + border + "\"\n"
	table += "       cellpadding=\"" + cellpadding + "\"\n"
	table += "       align=\"" + align + "\"\n"
	table += "       bgColor=\"" + bgcolor + "\">\n"
	
	
	// Calculate the width for <TD>
	var tdwidth = width / cols
	
	// Start Main Loop
	for (i = 1; i <= rows; i++) {
		table += "<!-- Row " + i + " -->\n"
		table += "<tr>\n"
		
		// TD Loop
		for (t = 1; t <= cols; t++) {
			table += "<td width=\"" + tdwidth + "\" align=\"" + tdalign + "\" valign=\"" + valign + "\">\n"
			table += "[Row " + i + ", Column " + t +"]\n"
			table += "</td>\n"
		}
		
		table += "</tr>\n\n"
	}
	
	// Finally, display the code
	if (table.indexOf("NaN") != -1) {
		table = "Sorry, er is een fout opgetreden tijdens het genereren van je tabel.\n"
		table += "Controleer alle velden en probeer het nogmaals."
	} else {
		table += "</table>"
	}
	document.form.table.value = table

	// As a nice feature, send the cursor to the code
	document.form.table.focus() 
}
// End Generator Function


// Begin Preview Function
function preview() {
	// Get table code
	var tdata = document.form.table.value 
	
	// Open a new window
	var preview = window.open("","preview","status=0,width=500,height=400,scrollbars=1")
	
	// Now write the window content
	preview.document.write("<html><head><title>Voorbeeld van je tabel</title></head>")
	preview.document.write("<body>")
	preview.document.write("<font face=verdana size=1><b>Voorbeeld van je tabel</b></font><p>")
	
	// The actual table
	preview.document.write(tdata)
	
	preview.document.write("</font></body></html>")
}
// End Preview Function

// Script Selector
// (IE Only)
function hilight() {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		document.form.table.select()
	} else {
		alert("Oops! This feature only works with Internet Explorer.\n\nSorry!")
	}
}
// End Script Selector

// Begin Form Clearer
function clearit() {

	// Make sure that they want to clear it
	if (confirm("Are you sure you want to clear all the data that you've entered?")) {
	
		// Clear the form
		document.form.reset()
	
		// Set focus back to first element
		document.form.elements[0].focus()
	} else {
		document.form.table.focus()
	}
}
// End Form Clearer