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 ~ */
  	tmp_str_ids   = tmp_str_ids2.substring(1,tmp_str_ids2.length);
  	tmp_str_vals  = tmp_str_vals2.substring(1,tmp_str_vals2.length);

	/* 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;

	elmnt = new Option();
	elmnt.value = 0;
	elmnt.text = "Select";
	thisDoc[tmp_str_cb2].options[0]= elmnt;

	if(tmp_int_sel2 == 0 )
	{
	    tmp_int_idx = 0;
	}


	/* 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] != "" )
	    {
		elmt.value = tmp_arr_opt[k];

		if( tmp_int_sel2 == tmp_arr_opt[k] )
		{
		    tmp_int_idx = k+1;
		}

		elmt.text  = tmp_arr_txt[k];
	    }

	  /*
	    else
	    {
	    	elmt.value = "";
	    	elmt.text  = "None";
	    }
	*/
	    thisDoc[tmp_str_cb2].options[k+1]= elmt;
	}
	thisDoc[tmp_str_cb2].options[tmp_int_idx].selected = true;
  }
  else
  {
        elmt = new Option();
	elmt.value = "";
	elmt.text  = "None";
	thisDoc[tmp_str_cb2].options[0]= elmt;
  }
}

function change_Sol(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");
   
   tmp_arr_sel2 = tmp_int_sel2.split("~");
   //alert(tmp_arr_sel2);

   /* if values exist in 1st combobox */
   if( tmp_int_sel1 != "" )
   {
   	/* retrieve the corresponding ids for selected item */
  	tmp_str_ids = "tmp_arr_Solids["+tmp_int_sel1+"]";
	tmp_str_vals = "tmp_arr_Solvals["+tmp_int_sel1+"]";		

  	eval("tmp_str_ids2 = "+tmp_str_ids);
  	eval("tmp_str_vals2 = "+tmp_str_vals);

	/* remove the preceeding ~ */
  	tmp_str_ids   = tmp_str_ids2.substring(1,tmp_str_ids2.length);
  	tmp_str_vals  = tmp_str_vals2.substring(1,tmp_str_vals2.length);

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

	/* get the no of options for combobox 	*/
	tmp_int_cLen = eval('document.'+thisDoc.name+'["'+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;	

	//alert(thisDoc["frm_str_solid[]"].type);
	
	/* fill the 2nd combobox with appropriate values   */
	for(k=0;k<tmp_arr_opt.length; k++)
	{
	    elmt = new Option();
	    //alert(tmp_arr_txt[k]);
	    /* if option for selected item exists */
	    if(tmp_arr_txt[k] != "" )
	    {
		elmt.value = tmp_arr_opt[k];		
		
		//thisDoc[tmp_str_cb2].options[tmp_int_idx].selected = true;
		elmt.text  = tmp_arr_txt[k]; 
		thisDoc[tmp_str_cb2].options[k]= elmt;
		//tmp_int_idx++;
		
		/* loop through the options to be displayed as selected */
		for(s=0; s<tmp_arr_sel2.length; s++)
		{
		    /* compare the value with all the options in the list */		
		    if(tmp_arr_sel2[s] == tmp_arr_opt[k])
		    {		
		        // eval(document.frm["frm_str_solid[]"][s].selected=true);		       
		        //eval(thisDoc["frm_str_solid[]"][k].selected=true);		      
		        eval(thisDoc[tmp_str_cb2][k].selected=true);	
		    }
		}   


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

/*
//alert(tmp_arr_txt[k]+"\n"+tmp_arr_sel2[s]+"\n"+tmp_arr_opt[k]+"\n"+tmp_int_idx);
// tmp_int_idx = k+1;		    
//eval('document.'+thisDoc.name+'["'+tmp_str_cb2+'"].length')
//  eval('document.'+thisDoc.name+'["'+tmp_str_cb2+'['+tmp_int_idx+']'"].selected = true');
//  eval('thisDoc[tmp_str_cb2].type = "select-multiple"');
//  eval('thisDoc[tmp_str_cb2][tmp_int_idx].selected = true');
//document.project["frmThmIds[]"][i].value; 	
// alert(eval('thisDoc["frm_str_solid[]"+[tmp_int_idx]].selected = true'));
//str = "thisDoc[frm_str_solid[]"+"[tmp_int_idx]].selected = true";
//alert(str);
//eval('str');
//cb2 = thisDoc.frm_str_solid[];
//eval('cb2.options[tmp_int_idx].selected=true')
*/