<input type="checkbox" id="chk" οnclick="IsAllCheck(this.checked)" />
<script language="javascript" type="text/javascript">
function IsAllCheck(IsCheck)
{
var form=document.getElementById("form1");
for(var i=0;i<form.length;i++)
{
if(form.elements[i].type=="checkbox")
{
form.elements[i].checked=IsCheck;
}
}
}
</script>