/**
 * サーバへのpostbackを行う。
 */
function doPostBack(url, commandType, commandParam) {

    document.forms[0].action = url;
    
    var hdnActionType = document.createElement("INPUT");
    hdnActionType.type = "hidden";
    hdnActionType.name = "actionType";
    hdnActionType.value = "postBack";
    document.forms[0].appendChild(hdnActionType);
    
    var hdnCommandType = document.createElement("INPUT");
    hdnCommandType.type = "hidden";
    hdnCommandType.name = "commandType";
    hdnCommandType.value = commandType;
    document.forms[0].appendChild(hdnCommandType);
    
    var hdnCommandParam = document.createElement("INPUT");
    hdnCommandParam.type = "hidden";
    hdnCommandParam.name = "commandParam";
    hdnCommandParam.value = commandParam;
    document.forms[0].appendChild(hdnCommandParam);
    
    document.forms[0].submit();
}

/**
 * checkboxに対応させたhiddenに値を設定する。
 */
function setCheckBoxValue(hdnCtrlName, chkCtrl) {
    var hdnCtrl = document.getElementsByName(hdnCtrlName);
    hdnCtrl[0].value = chkCtrl.checked;
}

/**
 * 汎用ウィンドウオープン
 */
function openWin(url,name,property) {
    newwin =window.open(url,name,property);
    newwin.focus();
}

/**
 * checkboxの値を直接サーバに通知する。
 */
function noticeCheckBoxValue(url,chkCtrl) {
    var img = new Image();
    img.src = url + "?" + chkCtrl.name + "=" + (chkCtrl.checked ? "true" : "false");
}