function [] = qc_html(cycle_startnum, experiment_path)

fret_num = cycle_startnum;
cy5_num = cycle_startnum+1;
cy3_num = cycle_startnum+2;
txred_num = cycle_startnum+3;

fret_name = sprintf('%03d', fret_num);
cy5_name = sprintf('%03d', cy5_num);
cy3_name = sprintf('%03d', cy3_num);
txred_name = sprintf('%03d', txred_num);

colorfluor_base = 'qc_colorfluor_';
fluorland_base = 'qc_fluorland_';
beadland_base = 'qc_beadland_';
fluorhist_base = 'qc_fluorhist_';

%determine the position from cycle_id_table.txt
ci = fopen([experiment_path '/IMAGES/RAW/cycle_id_table.txt'],'r');
cycle_ids = textscan(ci, '%s%s%s', 'delimiter', '\t', 'whitespace', '');
num_imgsets = size(cycle_ids{1},1);
for(i=1:num_imgsets)
    curr = cell2mat(cycle_ids{1}(i));
    if(size(curr, 2) == size(fret_name,2))
        if(curr == fret_name)
            position = cell2mat(cycle_ids{2}(i))
        end
    end
end
fclose(ci);

fwid = fopen(['../../QC/QC_' fret_name '-' txred_name '_' position '.html'], 'w');

fprintf(fwid, '<HTML>\n<BODY>\n');
fprintf(fwid, '%s', ['<h1><b> Data from cycles ' fret_name '-' txred_name '; tag-position ' position ' </b></h1>']);
fprintf(fwid, '%s\n', '<table>');

%fprintf(fwid, '%s','<tr>');
%fprintf(fwid, '%s', ['<td> <b> Data from cycles ' fret_name '-' txred_name '; tag-position ' position ' </b><br>']);
%fprintf(fwid, '%s', '<br>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' colorfluor_base fret_name '-' txred_name '.bmp><IMG SRC=' colorfluor_base fret_name '-' txred_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' fluorland_base fret_name '.bmp><IMG SRC=' fluorland_base fret_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' fluorland_base cy5_name '.bmp><IMG SRC=' fluorland_base cy5_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' fluorland_base cy3_name '.bmp><IMG SRC=' fluorland_base cy3_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' fluorland_base txred_name '.bmp><IMG SRC=' fluorland_base txred_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' beadland_base fret_name '.bmp><IMG SRC=' beadland_base fret_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' beadland_base cy5_name '.bmp><IMG SRC=' beadland_base cy5_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' beadland_base cy3_name '.bmp><IMG SRC=' beadland_base cy3_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');

fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' beadland_base txred_name '.bmp><IMG SRC=' beadland_base txred_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');


fprintf(fwid, '%s', '<br>');
fprintf(fwid, '%s', ['<td><a href=' fluorhist_base fret_name '-' txred_name '.bmp><IMG SRC=' fluorhist_base fret_name '-' txred_name '.bmp width=1200></a></td>']);
fprintf(fwid, '%s\n', '<tr>');


fprintf(fwid, '%s', '</table>');
fclose(fwid);
