How can I use a rjs inside another rjs?

For example:

a.rjs
page.insert_html :bottom, :criteriaDiv, :partial => 'criteria_item'

b.rjs
page.replace :keywordSearchLink, :partial =>
'criteria_item_add_link', :locals => { :form_name =>
'keywordFieldset'}
page.replace :propertySearchLink, :partial =>
'criteria_item_add_link', :locals => { :form_name =>
'propertyFieldset'}
page.replace :compositionSearchLink, :partial =>
'criteria_item_add_link', :locals => { :form_name =>
'compositionFieldset'}
page.insert_html :bottom, :criteriaDiv, :partial => 'criteria_item'

As we can see, each of the rjs inserts the same content to the same
part of the page. I can put the content to be inserted in a partial
template, but putting the two "page.insert_html" in one place should
be better. How can I do this? Thanks a lot.