<html>
<head><title>Radio</title>
<style><%include editor_dialog.css%></style>
<script>

var name, value, initial, tab;
function initDialog() {
    name  = document.getElementById('name');
    value = document.getElementById('value');
    initial = document.getElementById('initial');
    tab   = document.getElementById('tab');
}

function done () {
/* ---------------------------------------------------------
 * When the user hits done this fucntion is called to 
 * produce the html from the div tags. It then inserts
 * it into the edit window and closes this window.
 */
    var html = '<input type="radio"';
    if (name.value) 
      html += ' name="' + name.value + '"';
    if (value.value) 
      html += ' value="' + value.value + '"';
    if (tab.value) 
      html += ' tabindex="' + tab.value   + '"';
    if (initial.checked) 
      html += ' checked';
    html += '>';

    opener.dialogWindow.returnFunc(html);
    window.close();
}

// -->
</script>
<body class=body  onLoad ="initDialog();">
<table border=0 cellpadding=3 align=center>
    <tr class=body>
        <td>Group Name:</td><td><input id=name size=30 class=textbox></input></td>
    </tr>
    <tr class=body>
        <td>Value:</td><td><input id=value size=30 class=textbox></input></td>
    </tr>
    <tr class=body>
        <td>Initial State:</td>
        <td>
            <table border=0>
                <tr class=body>
                    <td>
                        <input value=on type=radio id=initial name="initial" checked> Selected
                    </td>
                    <td>
                        <input value=off type=radio id=initial name="initial"> Not Selected
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr class=body>
            <td>Tab order:</td><td><input id=tab size=3 class=textbox></td>
    </tr>
</table>
<hr>
<div align=right>
    <button class=button onclick="done();">OK</button> &nbsp;
    <button class=button onclick="window.close();">Cancel</button>&nbsp;
</div>
</body>
</html>
