function change(tmp_str_frm,tmp_str_cb1,tmp_str_cb2,tmp_int_sel2)
{
/*
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
	 Name		: change()
	 Purpose	: Dynamic interdependant comboboxes
	 Inputs		: tmp_str_frm  	 -> form name
			  tmp_str_cb1 	 -> 1st combobox
			  tmp_str_cb2	 -> 2nd combobox
			  tmp_int_sel2	 -> value in 2nd combobox to be displayed
			  		    as selected
	 Outputs	: change the data to be displayed depending on value
	 		  selected in 1st combo box
	 Calls		: None
	 Called By	:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*/


   /* get the form object */
   eval("thisDoc = document."+tmp_str_frm);

   /* get the selected option */
   eval("tmp_int_sel1 = thisDoc."+tmp_str_cb1+"[thisDoc."+tmp_str_cb1+".selectedIndex].value");   
   
   
   /* if values exist in 1st combobox */
   if( tmp_int_sel1 != "" )
   {
   	/* retrieve the corresponding ids for selected item */
  	tmp_str_ids = "tmp_arr_ids2["+tmp_int_sel1+"]";
	tmp_str_vals = "tmp_arr_vals2["+tmp_int_sel1+"]";
  	
  	eval("tmp_str_ids2 = "+tmp_str_ids);
  	eval("tmp_str_vals2 = "+tmp_str_vals);  	

	/* remove the preceeding ~ */
  	if(tmp_str_ids2.length != 1){
	  	tmp_str_ids   = tmp_str_ids2.substring(1,tmp_str_ids2.length);
	  	tmp_str_vals  = tmp_str_vals2.substring(1,tmp_str_vals2.length);
  	}else{
	  	tmp_str_ids   = tmp_str_ids2;
	  	tmp_str_vals  = tmp_str_vals2;
  	}
 	

	/* convert into array by splitting on basis on ~ */
	tmp_arr_opt = tmp_str_ids.split("~");
	tmp_arr_txt = tmp_str_vals.split("~");
	

	/* get the no of options for combobox 	*/
	tmp_int_cLen = eval("thisDoc."+tmp_str_cb2+".length");

	/* empty the old list of options */
	for(j = tmp_int_cLen; j>=0; j--)
	{
		thisDoc[tmp_str_cb2].options[j] = null;
	}

	tmp_int_idx = 0;
	
	if((tmp_arr_opt.length == 1) && (tmp_arr_opt[0] == "0")){
        	elmt = new Option();
		elmt.value = "";
		elmt.text  = tmp_str_select;
		thisDoc[tmp_str_cb2].options[0]= elmt;
	

	        elmt = new Option();
		elmt.value = "0";
		elmt.text  = tmp_str_other;
		thisDoc[tmp_str_cb2].options[1]= elmt;

		thisDoc[tmp_str_cb2].options[0].selected = true;
	}else{
		
		/* fill the 2nd combobox with appropriate values   */
		for(k=0;k<tmp_arr_opt.length ; k++)
		{
		    elmt = new Option();
		    
		     /* if option for selected item exists */
		    if((tmp_arr_txt[k] != "" ) && (tmp_arr_opt[k] != "" ))
		    {	        
			elmt.value = tmp_arr_opt[k];
			if( tmp_int_sel2 == tmp_arr_opt[k] )
			{
			    tmp_int_idx = k;
			}
	
			elmt.text  = tmp_arr_txt[k];
		    }
		    else
		    {
		    	elmt.value = "0";
		    	elmt.text  = tmp_str_other;
		    }

		    thisDoc[tmp_str_cb2].options[k]= elmt;
		}
	
		thisDoc[tmp_str_cb2].options[0].selected = true;
  	}
  }
  else
  {
        elmt = new Option();
	elmt.value = "0";
	elmt.text  = tmp_str_other;
	thisDoc[tmp_str_cb2].options[0]= elmt;
  }

}