
function savePreference(){
    // 初期設定を localStorage に保存して画面を再表示
    var array = columsForInvisible(); // 非表示カラム番号の配列
    setInvisibleColumns(array); // 非表示カラム番号の配列を localStorage に記憶
    
    // 画面を再表示
    window.location.reload();
}

function openPreference(){
    // 初期設定パネルを開く
	var elm = document.getElementById("_floatPanel");
	elm.innerHTML = "";
	var tbl = newTABLE(elm, "");
	tbl.style.fontSize = "9pt";
    
    var cols = columns();
    for (num in cols){
        var colObj = cols[num];
        var label = colObj.label;
        var tr = newTR(tbl, "", "");
        var td = newTD(tr, "", "");
        var cb = newCHECKBOX(td, "", label, isInvisible(num));
        cb.setAttribute("onchange","setColStatus(this,'" + num +"')");
    }
    var tr = newTR(tbl, "", "");
    var td = newTD(tr, "/right-side", "");
    td.style.paddingRight = "0";
    var bt = newDIV(td, "/whiteButton");
    bt.setAttribute("onclick", "savePreference()");
    bt.innerHTML = "チェック項目を非表示にする";
    
	var buff = elm.innerHTML;
    
	openFloatPanel(tbl, 10, 30, "初期設定", "fixed");
}