Uncaught ReferenceError: select_all is not defined
===

I'm getting this error as well as being told that the check box has not been checked. I have multiple checkboxes and one that is the option for "Select All". So it is telling that there isn't a checkbox selected. In debugging I see I get the Uncaught ReferenceError. I can't seem to see what is the problem. Anyone have any idea what is throwing this? Thank you in advance.

Here is the HTML:

    <table width="470" class="noborder">
		<tr>
			  <tr>
				<td><input type="checkbox" id="list_type" name="list_type[]" value="brochure" /></td>			
				<td span style="color:#628D8B">I Would Like to Receive a Complimentary Brochure- The Tile Story, A Step by Step Guide</td>
			  </tr>
			  <tr>
		  <tr>
			<td><input type="checkbox" id="list_type" name="list_type[]" value="newsletters" /></td>			
			<td>Receive Monthly Newsletters</td>
		  </tr>	  
		  <tr>
			<td><input type="checkbox" id="list_type" name="list_type[]" value="events" /></td>			
			<td>Receive Notification on Upcoming Events</td>
		  </tr>  
	  
		  <tr>
			<td><input type="checkbox" id="list_type" name="list_type[]" value="products" /></td>			
			<td>Receive Notification on New Products</td>
		  </tr>
		  <tr>
			<td><input type="checkbox" id="list_type" name="list_type[]" value="consultant" /></td>			
			<td>I Would Like to Have a Design Consultant Contact Me </td>
		  </tr>
		  
			<td><input type="checkbox" id="list_type" name="list_type[]" value="all" onClick="select_all('list_type', isChecked);" /></td>
			<td><strong>Select All of the Above</strong></td>
		  </tr>
		  <tr><td>&nbsp;</td></tr>
		  <tr>
			<td><input type="checkbox" id="opt_out" name="list_type[]" value="opt_out" /></td>			
			<td><span style="color:#628D8B">I would like to Opt-Out from receiving information from Architectural Ceramics</span></td>
		  </tr>
		  <tr>
			<td></td>
			<td><br /><input name="submit" type="image" value="submit" src="/images/submit_btn_off.gif"  onmouseout="this.src='/images/submit_btn_off.gif'" onmouseover="this.src='/images/submit_btn_on.gif'" alt="submit"  /></td>
		  </tr>
		  
	  </table>

Here is the JavaScript:

    <SCRIPT LANGUAGE="JavaScript">
    <!--

    var isChecked = 1;
    var formblock;
    var forminputs;

    function prepare() {
        formblock= document.getElementById('form_id');
        forminputs = formblock.getElementsByTagName('input');
    }

    function select_all(name, value) {
	for (i = 0; i < forminputs.length; i++) {
	// regex here to check name attribute
	var regex = new RegExp(name, "i");
	
		if (regex.test(forminputs[i].getAttribute('name'))) {
	
			if (value == '1') {
			forminputs[i].checked = true;
			isChecked = 0;
			}else{
			forminputs[i].checked = false;
			isChecked = 1;
			}
		}
	}
    }

    if (window.addEventListener) {
        window.addEventListener("load", prepare, false);``
        }else if (window.attachEvent) {
        window.attachEvent("onload", prepare)
        }else if (document.getElementById) {
        window.onload = prepare;
    }

    // -->
    </script>