<script language = "javascript">
<!--

function ChangeViewSettings()
{
    if (document.forms['navigate'].elements['viewsettings'].checked){
        self.location='index.php?fuse=admin&action=SetShowAllSettings&viewall=1&group={settingGroup}';
    }else{
        self.location='index.php?fuse=admin&action=SetShowAllSettings&viewall=0&group={settingGroup}';
    }
}

function ToggleGroupSettings(ctrRadio, groupName)
{
    //for some reason false is yes
    if($(ctrRadio).checked){
        //hide
        mydisplay = "none";
    }else{
        //show
         if (isIE) {
 		    mydisplay = 'block';
         } else {
 		    mydisplay = 'table-row';
         }
    }

    aSettings = $('settingsTable').getElementsByTagName('TR');
 	for(var i=0; i < aSettings.length; i++) {
         if (aSettings[i].id == groupName) {
     		aSettings[i].style.display = mydisplay;
         }
    }
}

function launchhex()
{
    y = window.open("newedge/javascript/colorpicker/colorpicker.html","Hex","width=310,height=380,top=100,left=100,resizeable=no,scrollbars=no,menubar=no,toolbar=no,status=yes")
}

//-->
</script>

<table border=0 class=body width=500 cellpadding=0 cellspacing=0>
    <tr>
        <td colspan=2>
            [l]The settings below allow you to change the way your site looks and acts.  Make sure you fully understand what the setting's function is before making any changes.[/l]
            <br><br>
        </td>
    </tr>
    <tr>
        <td colspan=2 width="100%">
            <table width="100%" cellpadding=0 cellspacing=0 border=0>
                <!-- BEGIN DYNAMIC BLOCK: selectSetting -->
                <tr>
                    <td align="right" valign="middle" colspan="2">
                        <b>[l]Select a setting:[/l]</b>&nbsp; 
                        <select onchange=jumpMenu2('self',this,0)  class=body>
                        <!-- BEGIN DYNAMIC BLOCK: settingDropdownOption -->
                            <option value=index.php?fuse=admin&view=ViewSettings&group={settingDropdownGroup}&setting={settingDropdownLabel} {settingSelected} >
                                {settingDropdownLabelTranslated}
                            </option>
                        <!-- END DYNAMIC BLOCK: settingDropdownOption -->
                        </select>
                    
                    </td>
                </tr>
                <!-- END DYNAMIC BLOCK: selectSetting -->
                <tr>
                    <td colspan="2">
                        <form name=navigate name=jump method=post action=index.php onKeyUp="highlight(event)" onClick="highlight(event)">
                            <input type=checkbox name=viewsettings onClick='ChangeViewSettings();' {viewSettingsChecked} > [l]Show all settings at once[/l]
                        </form>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan=2>
            <TABLE height=16 cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
                  <TR>
                    <TD valign=center width="100%" bgColor=#ffffff><IMG height=15 src="images/spacer.gif" width=15></TD>
                  </TR>
                  <TR>
                    <TD class=cbBottomLine vAlign=center width="100%" colSpan=2 height=1>
                        <IMG height=1 src="images/spacer.gif" width=1 border=0>
                    </TD>
                  </TR>
              </TBODY>
            </TABLE>

            <br>
        </td>
    </tr>
</table>
<form name=settings method=post action="index.php?fuse=admin&action=UpdateSettings&group={settingGroup}&setting={selectedSetting}" onKeyUp="highlight(event)" onClick="highlight(event)">
    <table border=0 class=body width=500 cellpadding=0 cellspacing=0>
        <tr>
            <td width=100%>
                <table width=100% cellpadding=0 cellspacing=3 border=0>
                    <!-- BEGIN DYNAMIC BLOCK: settingRow -->
                    <tr class='{rowClass}' >
                        <td width=350 colspan="{settingRowColspan}">
                            &nbsp;<img src=images/sub_dot.gif>&nbsp;&nbsp;<b>{settingName}</b>:<br><br>
                            <div class=smalltext>{settingDescription}</div>
                            <!-- BEGIN DYNAMIC BLOCK: colorUtility -->
                            <br /><br />
                            (<a href="#" onclick=launchhex()>[l]Show Color Utility[/l]</a>)
                            <!-- END DYNAMIC BLOCK: colorUtility -->
                            <!-- BEGIN DYNAMIC BLOCK: settingHelp -->
                                <br />
                                (<a href="#"  onMouseDown="openHelpWindow('{settingModule}', '{settingClass}', '{untranslatedEncodedSettingName}', 'menubar=no,scrollbars=yes,width=240,height=420')">{helpLinkLabel}</a>)<br />
                            <!-- END DYNAMIC BLOCK: settingHelp -->
                        </td>
                        <td align=right width=35%>
                            <!-- BEGIN DYNAMIC BLOCK: yesnoType -->
                            <input type="radio" id="value_{settingId}" name="value_{settingId}" value="0" {noSelected} >[l]No[/l]&nbsp;&nbsp;
                            <input type="radio"  id="value_{settingId}" name="value_{settingId}" value="1" {yesSelected} >[l]Yes[/l]
                            <!-- END DYNAMIC BLOCK: yesnoType -->
                            <!-- BEGIN DYNAMIC BLOCK: textType -->
                            <input type='text' name='value_{settingId}' size="40" value='{settingValue}'>
                            <!-- END DYNAMIC BLOCK: textType -->
                            <!-- BEGIN DYNAMIC BLOCK: smallTextareaType -->
                            <textarea class="smallTextarea" name="value_{settingId}" rows="3">{settingValue}</textarea>
                            <!-- END DYNAMIC BLOCK: smallTextareaType -->
                            <!-- BEGIN DYNAMIC BLOCK: textareaType -->
                            </td><tr><td colspan="2">
                            <textarea name='value_{settingId}' cols=120 rows=20 >{settingValue}</textarea>
                            <!-- END DYNAMIC BLOCK: textareaType -->
                            <!-- BEGIN DYNAMIC BLOCK: richTextareaType -->
                                <!-- BEGIN DYNAMIC BLOCK: includeRichTextEditorLib -->
                                   <script type="text/javascript" src="newedge/javascript/editor/scripts/innovaeditor.js?version={VERSION}"></script>
                                <!-- END DYNAMIC BLOCK: includeRichTextEditorLib -->
                            </td>
                            <tr class="{rowClass}">
                            <td colspan="2">
                                <textarea id='value_{settingId}' name='value_{settingId}' style="width:650px; height:250px;">{settingValue}</textarea>
                                <script type="text/javascript">showRichTextEditorForSettings({settingId}, false);</script>
                            <!-- END DYNAMIC BLOCK: richTextareaType -->
                            <!-- BEGIN DYNAMIC BLOCK: dualTextareaType -->
                                <!-- BEGIN DYNAMIC BLOCK: includeRichTextEditorLib -->
                                   <script type="text/javascript" src="newedge/javascript/editor/scripts/innovaeditor.js?version={VERSION}"></script>
                                <!-- END DYNAMIC BLOCK: includeRichTextEditorLib -->
                            </td>
                            <tr class="{rowClass}">
                            <td colspan="2">
                                <ul class="shadetabs">
                                    <li class="selected">
                                        <a href="javascript:void(0);" onclick="selectHTMLTab(this, 'value_{settingId}')">
                                            [l]HTML[/l]
                                        </a>
                                    </li>
                                    <li class="">
                                        <a href="javascript:void(0);" onclick="selectPlainTextTab(this, 'value_{settingId}')">
                                            [l]Plain-Text[/l]
                                        </a>
                                    </li>
                                </ul>
                                <div id="richTextWrapper_value_{settingId}">
                                    <textarea id='value_{settingId}[0]' name='value_{settingId}[0]' style="width:650px; height:250px;">{settingValueHTML}</textarea>
                                    <script type="text/javascript">showRichTextEditorForSettings({settingId}, true);</script>
                                </div>
                                <textarea id='value_{settingId}[1]' name='value_{settingId}[1]' style="width:650px; height:250px; display:none;">{settingValuePlainText}</textarea>
                            <!-- END DYNAMIC BLOCK: dualTextareaType -->
                            <!-- BEGIN DYNAMIC BLOCK: optionsType -->
                            <select name="value_{settingId}">
                                <!-- BEGIN DYNAMIC BLOCK: optionsTypeItem -->
                                <option value="{optionTypeItemValue}" {optionTypeItemSelected}>{optionTypeItemLabel}&nbsp;&nbsp;</option>
                                <!-- END DYNAMIC BLOCK: optionsTypeItem -->
                            </select>
                            <!-- END DYNAMIC BLOCK: optionsType -->
                            <!-- BEGIN DYNAMIC BLOCK: multipleoptionsType -->
                            <select name="multiplevalue_{settingId}[]" multiple="true" size="5" >
                                <!-- BEGIN DYNAMIC BLOCK: multipleoptionsTypeItem -->
                                <option value="{optionTypeItemValue}" {optionTypeItemSelected}>{optionTypeItemLabel}&nbsp;&nbsp;</option>
                                <!-- END DYNAMIC BLOCK: multipleoptionsTypeItem -->
                            </select>
                            <!-- END DYNAMIC BLOCK: multipleoptionsType -->
                            <!-- BEGIN DYNAMIC BLOCK: colorType -->
                            <input type=text size=40 name='value_{settingId}' class=body value='{settingValue}' / >
                            <table width=100% cellpadding=1 cellspacing=0 border=1>
                                <tr>
                                    <td bgcolor="{settingValue}"><font color="{settingValue}">&nbsp;</font></td>
                                </tr>
                            </table>
                            <!-- END DYNAMIC BLOCK: colorType -->
                        </td>
                    </tr>
                    <tr><td colspan=2>&nbsp;</td></tr>
                    <!-- END DYNAMIC BLOCK: settingRow -->
                </table>
            </td>
        </tr>
        <input type=hidden name=settingsArray value='{settingIds}'>
        <tr>
            <td colspan=2 align=right>
                <br><br><input type=submit class=button_large value='[l]update settings[/l]' onclick='check(form,form.elements.length);return false;'>
            </td>
        </tr>
    </table>
</form>

