<% use obfui::cmn; my ($have_extr,$what,$keytoset,$bases,$limited) = @_;  %>
<script language=javascript>
<!--
function ge_by_id(nm)
{
    return document.getElementById(nm);
}
function show_alt_options(sel)
{
    for(var i=0;i<sel.options.length;++i)
    {
    var id = sel.options[i].value;
    ge_by_id('alt_' + sel.id + '_' + id).style.display = 'none';	
    }
    ge_by_id('alt_' + sel.id + '_' + sel.options[sel.selectedIndex].value).style.display = 'block';
    sel['idx-was'] = sel.selectedIndex;
    setFooterBottom(1);
}
-->
</script>

<% $forge->include('block-switchbase-hint',$have_extr,$what,$limited,0) %>


<p>You can
<a class=noul
    href=settings.switchbase.$what> switch presets by selecting samples of protected code</a>
too, on a different page.


<p>
<form method=post>
<input type=hidden name=havevals value=1>
<input type=hidden name=keytoset value=<%= $keytoset %>>

<table style='width: 85%'><tr><td style='width: 100%; zborder: 1px solid black;' >
<select name=newbase onchange='show_alt_options(this)' id=m style='width: 100%;'>
<% foreach (@$bases) { 
    my ($id,$title,$descr,$iscur,$isprecreated) = @$_; 
    $title =~ s/^SPECIAL BASE[^:]*://g;
%><option value=<%= $id %> <%= $iscur ? 'selected' : '' %> ><%= $title %>
<% } %>
</select>



<% 
  foreach (@$bases) { 
    my ($id,$title,$descr,$iscur,$isprecreated) = @$_; 
    $title =~ s/^SPECIAL BASE[^:]*://g;
%>
    <div class=mode-outer id=alt_m_<%= $id %> style='width: 100%'>
    <div class=mode>
    <span class=mode-title>Description for <a class=noul 
	  href=modes.edit.$id><%= $title %></a>:</span><p>
	<% if (!$isprecreated) { %><pre><%= $descr %></pre><% 
	} else { 
	    $descr =~ s,(<div class=whentouse>),$1<span class=whentouse>WHEN TO USE:</span>,g;
    
	    %><div class=mode-descr><%$ $descr %></div><% } %>
    </div></div>
<% }; %>
<script>
<!--
show_alt_options(ge_by_id('m'));
-->
</script>
</table>
<%   if (!@$bases) {
%>
<p>
<b><%= __('You project was created in previous version of the product, that had 
no predefined modes of the specified type to choose from. Please recreate your 
project in this version of the Product to be able to use this menu item.') 
%></b>
<% } %>
</dl>
<p>
<% $forge->include('wgt-submitbtn'); %>
<% $forge->include('wgt-backbtn'); %>
</form>

<% if ($limited) { %>
<script language=javascript>
<!--
    alert('<%=  __('This is trial edition. The only ways it can mangle symbols is by prepending fixed string to it, so irregarding of the symbol mangling mode you will choose here, symbols will be just prefixed a ReplacementFor_ string or left as is. That does not limit your ability to evaluate the product in any way; purchase a  product to enable other ways of symbol mangling.') %>');
-->
</script>
<% } %>

