// V7-MultiProductImageSupport V1.02
function showicons(mainimage, cols, width, icons, images, alts){
  var haveicon = false;
  var code = '<table>';
  var col = 0;
  for ( var i = 0; i < icons.length; i++ )
    {
    if ( images[i] != '' )
      {
      if ( icons[i] == '' )
        {
        icons[i] = images[i] + '" width="' + width;
        }
      haveicon = true;
      if ( col == 0 ) code += '<tr>'; 
      code += '<td style="border:1px solid;"><img style="cursor:crosshair;" src="' + icons[i] + '"';
      if ( mainimage != '' ) code += ' onmouseover="swapimage(\'' + mainimage + '\',\'' + images[i] + '\');"';
      if ( alts[i] != '' ) code += ' alt="' + alts[i] + '"';
      code += '/></td>';
      col++;
      if ( col >= cols )
        {
        code += '</tr>';
        col = 0;
        }
      }
    }
  while ( col != 0 && col++ < cols ) code += '<td>&nbsp;</td>';
  code += '</table>';
  if ( haveicon ) document.write(code);
}

function swapimage(main, alter){
  document.getElementById(main).src = alter;
}


