<% use obfui::cmn;  my ($sd,$id,$is_2inputs,$is_input) = @_;
        %>

            <div class=block-of-code>
	    <div  class=code 
		<% if (!$is_input) { %>
		    id=$id
		    onclick='modesample_clicked("<%= $id %>");'     
		    onmouseover="return overlib('Click to select this preset, then click OK at the bottom of the page.');" onmouseout="return nd();"
		<% } %>
	    >
     <% if ($is_2inputs) { %>
	    <div class=code-type-label>Raw code sample</div>
     <%
	}
	my $cmt;
        foreach('','-extr')
        {
            my $is_extr = length($_);
            next if $is_extr && !$is_2inputs;

            my $key = $id . $_;
	    my $code;
            ($cmt,$code) = ($sd->{$key}->{ $is_input ? 'comment_input' : 'comment'},
                    $sd->{$key}->{ $is_input ? 'input' : 'output' });

	    $code = $forge->escape_html($code);
	    $code =~ s,\t,        ,g;
	    $code =~ s, ,&nbsp; ,g;
	    $code =~ s,\r?\n,<br>,g;
	    if ($is_extr) {
	    %>
		<div class=code-separator><hr></div>
		<div class=code-type-label>Code inside markup</div>
         <% }; %>
                <%$ $code %>

            <%
        }
        %>
            </div><!--of div.code -->
            <div class=comment><%$ $cmt %></div>    
    </div>
