Search panel uses javascript. Reuse code for detailsPanel for all places where the same information is needed