What I'm trying to accomplish here is when: Office Departure/Return is selected then the 2 fields
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_40_1" ID="_1_1_40_1" value="[LL_FormTag_1_1_40_1 /]"></td>
and <td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_40_1" ID="_1_1_40_1" value="[LL_FormTag_1_1_41_1 /]"></td>
will become required field.

Any help will be apprieciated




function fieldValidation()
{
if($("#_1_1_45_1").val()=='_1_1_2' &&($("#_1_1_40_1").val()==''&&$("#_1_1_41_1").val()==''))
{
alert('OFFICE DEPARTURE TIME and TIME RETURNED TO OFFICE are required!');
return false;
}


else
{
return true;
}
}

function Meansofpayment(_1_1_45_1)
{
if (_1_1_45_1!="") {
obj=document.getElementById(_1_1_45_1);
obj.style.display=( (obj.style.display=='none') ? '' : 'Please select');
}


}


<Fieldset>
<legend> POST INSPECTION</legend>
<ul>


<TABLE align ="center">
<tr>
<TD CLASS="required" NOWRAP VALIGN="MIDDLE"> <font size="2" color="red"><b> Daily Activites Selection</b></font></TD>
<td><SELECT NAME="_1_1_45_1" id="_1_1_45_1" ONCHANGE="Meansofpayment(this.value)">
<OPTION VALUE="Please select..." >Please select...</OPTION>
<OPTION VALUE="_1_1_1" >Site Arrival/Departure</OPTION>
<OPTION VALUE="_1_1_2" >Office Departure/Return</OPTION>
<OPTION VALUE="_1_1_3" >Lunch Time</OPTION>

</SELECT></TD></TR>



<TR>
<tr id="_1_1_1" style="display:none">
<TD CLASS="required" NOWRAP VALIGN="MIDDLE"> Site Arrival Time </TD>
<td width="5" align="right"><input CLASS="valueEditable"type="text" name="_1_1_13_1" ID="_1_1_13_1" value="[LL_FormTag_1_1_13_1 /]">
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>


<TD CLASS="required" NOWRAP VALIGN="MIDDLE">Site Departure Time </TD>
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_14_1" ID="_1_1_13_1" value="[LL_FormTag_1_1_14_1 /]"></td>
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>
</tr>
</tr>




<tr>
<tr id="_1_1_3" style="display:none">
<TD CLASS="label" NOWRAP VALIGN="MIDDLE">Lunch Start Time </TD>
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_46_1" ID="_1_1_46_1" value="[LL_FormTag_1_1_46_1 /]"></td>
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>



<TD CLASS="label" NOWRAP VALIGN="MIDDLE">Lunch End Time </TD>
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_47_1" ID="_1_1_47_1" value="[LL_FormTag_1_1_47_1 /]"></td>
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>

</tr>

</tr>

<TR>

<tr id="_1_1_2" style="display:none">

<TD CLASS="required" NOWRAP VALIGN="MIDDLE">Office Departure Time </TD>
<td width="10" align="right"><input CLASS="valueEditable"type="text" name="_1_1_40_1" ID="_1_1_40_1" value="[LL_FormTag_1_1_40_1 /]"></td>
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>

<TD CLASS="required" NOWRAP VALIGN="MIDDLE"> Time Returned to Office </TD>
<td align="right" size="10"><input CLASS="valueEditable"type="text" name="_1_1_41_1" ID="_1_1_41_1" value="[LL_FormTag_1_1_41_1 /]"></td>
<TD CLASS="label" NOWRAP VALIGN="Right"></TD>

</tr>
</tr>
</table></fieldset>