
function initConditions() {
    if ($('GoodsTitle').value == "" || $('GoodsTitle').value == "曲名（曲集名）フリーワード") {
        $('GoodsTitle').value = "曲名（曲集名）フリーワード";
        $('GoodsTitle').style.color = "#808080";
    }

    Event.observe("GoodsTitle", 'focus', focusGoodsTitle, false);
    Event.observe("GoodsTitle", 'blur', blurGoodsTitle, false);
}

function focusGoodsTitle() {
    if ($('GoodsTitle').value == "曲名（曲集名）フリーワード") {
        $('GoodsTitle').value = "";
        $('GoodsTitle').style.color = "black";
    }
}

function blurGoodsTitle() {
    if ($('GoodsTitle').value == "") {
        $('GoodsTitle').value = "曲名（曲集名）フリーワード";
        $('GoodsTitle').style.color = "#808080";
    }
}

function openSubWindow(htmlFileName) {

    win1 = window.open("/" + htmlFileName, "subWindow", 'width=950, height=600, menubar=no, toolbar=no, scrollbars=yes');
    win1.focus();
}

function MM_goToURL() { //v3.0
    var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
    for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function clearConditions() {

    $('GoodsComposerJa').selectedIndex = 0;
    $('GoodsQuick').selectedIndex = 0;
    $('GoodsTitle').value = "";
    $('GoodsKoutei').selectedIndex = 0;
    $('GoodsHensei').selectedIndex = 0;
    $('GoodsHenkyoku').selectedIndex = 0;
    $('GoodsPublisher').selectedIndex = 0;
    $('GoodsFreewords').value = "";

    initConditions();
}
