Need a javascript function to identify the which textbox used while clicking save button
<p>I have 3 textboxes in 3 tabs of same ASP.net page and corresponding 3 javascript functions of same functionality. Presently I am using 3 different functions for three textboxes. I need only a single javascript function instead of three. Please help me</p>

<pre><code>&lt;asp:TextBox ID="textBox1" runat="server" ValidationonGroup="abcd"&gt;&lt;/asp:TextBox&gt;
&lt;asp:CustomValidator ID="ID1" runat="server" ValidationGroup="abcd" ControlToValidate="textBox1" ErrorMessage="message" ClientValidationFunction="fname"&gt;&lt;/asp:CustomValidator&gt;
</code></pre>

<p>Javascript functon</p>

<pre><code>function fname(sender, args) {
 var x = document.getElementById('&lt;%=txtBox1.ClientID%&gt;').value;
 if (some condition) { 
args.IsValid = false; 
} else { 
args.IsValid = true;
}
}
</code></pre>