hi,

i have a simple contact form.in that the fields are as follows.
1.part-time-job
radiobuttongroup1[value=yes]
source[textbox]
income[textbox]
radiobuttongroup1[value=no]


2.health-problem
radiobuttongroup3[value=yes]
which-kind[textbox]
amount-need[textbox]
radiobuttongroup[value=no]

3.house
radiobuttongroup4[value=free]
radiobuttongroup4[value=rented]
radiobuttongroup4[value=shared]
rent[textbox]



here i want to make some validations.in part-time-job if a person clicks yes then it should display alert enter source and afterthat one more alert enter income if a person clicks on no then it should display alert select health-problem.

in health-problem if a person clicks yes then it should display alert enter whick-kind and afterthat one more alert enter amount-need. if a person clicks on no then it should display alert select the house.like this i want to validate.any of your help will be surely appreciated.here is my code for only if a person leave the part-time-job,it will display alert please select parttimejob.
var i=0;
var chkcount;
chkcount=0;
for (i=0;i<document.frm.elements.length;i++)
{
if ( document.frm.elements[i].type=="radio" && document.frm.elements[i].name=="radiogroup1" && document.frm.elements[i].checked==true
)

{
chkcount=chkcount+1

}

}
if (chkcount==0)
{
alert(" Please Select parttimejob");
return false;

}



thanks
mrjameer