Simplify it by placing the code in a function
<script>
function openWindow() {
var pid = document.getElementById('<%=txt_voucher.ClientID %>');
var chdate = document.getElementById('<%=txtbox_chqdate.ClientID %>');
var pname = document.getElementById('<%=txtbox_chprovider.ClientID %>');
window.open("Product.aspx?pid=" + pid + "chdate= " + chdate + " & pname= " + pname + ", null,scrollbars=yes,top=10,left=10", "true");
}
</script>
<asp:ImageButton ID="ibut_cheque2" runat="server" target="_blank" OnClientClick='openWindow()' AlternateText="Print" CssClass="btn5" ForeColor="White" ToolTip="Print Cheque" />