// 共通スクリプト (utf-8)

function C_ResetForm(form)
{
    form.reset();
}

function C_SubmitForm(form)
{
    if (typeof(form.tick) != 'undefined')
        form.tick.value = (new Date()).getTime();
    if (typeof(form.done) != 'undefined')
        form.done.value = window.location.href;
    form.submit();
}

function C_EditForm(form, phase)
{
    if (typeof(form.tick) != 'undefined')
        form.tick.value = (new Date()).getTime();
    if (typeof(form.phase) != 'undefined')
        form.phase.value = phase;
    form.submit();
}

function C_CreateEmptyWindow(name, caption)
{
    var option =
        "toolbar=no," +
        "location=no," +
        "scrollbars=no," +
        "directories=no," +
        "status=no," +
        "resizable=no," +
        "width=1," +
        "height=1";

    var w = window.open("", name, option);
    w.document.open();
    w.document.write('<ht' + 'ml><bo' + 'dy bgcolor="#FFFFFF" scroll="no">');
    w.document.write('<span style="font-size:9px;">' + caption + '</span>');
    w.document.write('</bo' + 'dy></ht' + 'ml>');
    w.document.close();
    return w;
}
