Javascript help

Hi guys!

I have a form with 1 textbox, a set of radio buttons and a submit button. When the user clicks on submit, and the textbox is empty the user is asked to fill “Nill” if he wishes to leave the box empty. But if he writes anything in the textbox other than “Nill” (or in any case insensitive form) he should be prompted to check at least one of the radio buttons. Any idea how to do this?
I tried testing it with this:
[color=red]function chk()[/color]
[color=red]var date1 = document.myform.myText.value;[/color]
var expression = /^[ ]?nill[ ]?$/i;[/color]
[color=red]if(!expression.test(date1) && date1 != “”)
alert(" Working, now check for radio buttons ")
but this itself isn’t working :frowning:

please help!