
/**
 * 表示/非表示の切り替え
 *
 */

function disp_toggle(disp_id) {

	with (document.getElementById(disp_id)) className = (className == "active") ? "inactive" : "active";

}


/**
 * チェックボックスを全て選択
 *
 */
function selectGroup(prefix) {
    var regexp = new RegExp("^" + prefix + "_");
    var inputs = document.getElementsByTagName("input");
 
    for (var i = 0, l = inputs.length; i < l; i++) {
        var input = inputs[i];
 
        if (input.type == "checkbox" && input.id.match(regexp))
            input.checked = "checked";

    }
}


/**
 * フォームボタン用ロールオーバ
 *
 */
 
 $(document).ready(function() {
    $(".input_ro").mouseover(function(){
			if(document.all && navigator.userAgent.indexOf("MSIE 8.") == -1){
	    	this.className = this.getAttribute("className").replace("_off", "_on");
			}
			else{
				this.setAttribute("class", this.getAttribute("class").replace("_off", "_on"));
			}
    });
    $(".input_ro").mouseout(function(){
			if(document.all && navigator.userAgent.indexOf("MSIE 8.") == -1){
	    	this.className = this.getAttribute("className").replace("_on", "_off");
			}
			else{
				this.setAttribute("class", this.getAttribute("class").replace("_on", "_off"));
			}
    });
});


