Your plan group is parent.EligPlanGroups[parent.CurrentPlanGroup][0] which you can save into a Global variable. In
if(ch==null || parseInt(ch,10)==1 || ch=="") { //add
if (uf_planGroup=="HEALTH") {
table1 += 'Select the medical plan... '
{
else table1 += getSeaPhrase("AVAILBEN_9","BEN")
} else { if(parseInt(ch,10)>imgNbr-1) ch=imgNbr-1
Search if(ch==null || parseInt(ch,10)==1 || ch=="") { Kunda hard to explain and be carefull, its your fault if you mess it up, backup first. Thanks