Getting message: 'THIS' is undefined with simple box checking
<p>I have 1 checkbox that when checked or unchecked will check or uncheck a specific number of other checkboxes.  I have it for 3 simple checkboxes but I keep getting 'THIS' is undefined.  I'm testing in firefox 7 and ie 8.  Here is the html code:</p>

<pre><code>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
function check(field, varstring, caller)
{
   var arrvars = varstring.split(" ");
   if (caller == "Check All")
   {
      for (i = 0; i &lt; field.length; i++)
      {
        for(j=0; j&lt;arrvars.length; j++)
        {
            if(field[i].value==arrvars[j])
            field[i].checked = true;
        }
      }
      return "Uncheck All";
   }
   else
   {
      for (i = 0; i &lt; field.length; i++)
      {
        for(j=0; j&lt;arrvars.length; j++)
        {
            if(field[i].value==arrvars[j])
            field[i].checked = false;
        }
      }
      return "Check All";
    }
}

&lt;/script&gt;

&lt;form&gt;

&lt;INPUT STYLE="WIDTH: 13PX; HEIGHT: 13PX; VERTICAL-ALIGN: MIDDLE;" RUNAT="SERVER" TYPE="CHECKBOX" ID="CKALL2" NAME="CKALL2" TITLE="CHECK ALL" ONCLICK ='THIS.TITLE=CHECK(THIS.FORM.V_I, "X718 X1384 X2096", THIS.TITLE)' /&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;INPUT RUNAT="SERVER" TYPE=CHECKBOX DISABLED TITLE="1920" /&gt;
&lt;INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X718" TITLE="1921" /&gt;
&lt;INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X1384" TITLE="1922" /&gt;
&lt;INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X2096" TITLE="1923" /&gt;
&lt;/form&gt;
</code></pre>
