In the following code:
Code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

<!--

function disableelements(formname,x) 

{

	if (formname.condition(x).disabled == false)

	  {

		eval("formname.condition"+x+".disabled=true;");
	  }
	else if (formname.condition(x).disabled == true)
	  {
		eval("formname.condition"+x+".disabled=false;");
	  }
}
//-->
</SCRIPT>
It will work if I hard code the value of x into the if statement (ex: formname.condition1). However in this sample code it will not work if I try to add the variable x into the if statement. How do I get it to use the x variable without hard coding that information in?