{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default attribute_base=ContentObjectAttribute}
<script type="text/javascript" src={"javascript/ezmultioption/ezmultioption.js"|ezdesign} charset="iso-8859-1"></script>
<script type="text/javascript">
var tmpArray;
var tmpArray1;
var tmpArray2;
var rules{$attribute.id} = new Array(); //all rules [i]

{section var=Rules loop=$attribute.content.rules}
  tmpArray = new Array();

  tmpArray[0] ='{$Rules.key}';     // array  for all rules for one option  [0] is is option_id [1] is rules [0][1]
  // tmpArray[1] here will be the rules for this option

  tmpArray2 = new Array();     // here we will store rules data for option id [j]
    {section var=RuleForMultioption loop=$Rules.item}
         tmpArray1 = new Array();   // rule [0] moption_id  [1] options for which option is enabled[0][1]
         tmpArray1[0]='{$RuleForMultioption.key}';
         tmpArray1[1] = new Array();             ///////// [k]   [i][1][j][1]
        {section var=Ritems loop=$RuleForMultioption.item}
            tmpArray1[1][{$Ritems.index}] = '{$Ritems.item}';
        {/section}
         tmpArray2[{$RuleForMultioption.index}] = tmpArray1;
    {/section}
  tmpArray[1] = tmpArray2;
  rules{$attribute.id}[{$Rules.index}] = tmpArray;
{/section}
</script>
{section var=GroupList loop=$attribute.content.optiongroup_list}
{include uri='design:content/datatype/view/multioption2/multioption2.tpl' name=ChildGroup1 attribute=$attribute group=$GroupList.item parent_group_id=$attribute.content.group_id depth=1}
{/section}
<script type="text/javascript">
initSelects();
init_options(rules{$attribute.id},{$attribute.id});
</script>
{/default}
