Looks like it should work. I have a suggestion for easier code maintenance: instead of editing 13 lines throughout the file, add one line at the end to insert the id after the class:
PHP Code:
$options_wrapper_id[] = 'wAttrib-' . $products_options_names->fields['products_options_id'];//gjh42
//following line in place of 13 line edits above
$tmp_attributes_image = str_replace ('class="attribImg"','class="attribImg" id="is-'.$products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"',$tmp_attributes_image);//gjh42 20100716
// attributes images table
$options_attributes_image[] = trim($tmp_attributes_image);
$products_options_names->MoveNext();
}