function expand(URI,SUB,EXP){
  if(document.getElementById) {
    if(document.getElementById(SUB).style.display) {
      if(URI != 0) {
        document.getElementById(SUB).style.display = "block";
        document.getElementById(EXP).style.display = "none";
      } else {
        document.getElementById(SUB).style.display = "none";
        document.getElementById(EXP).style.display = "block";
      }
    } else {
      location.href = URI;
      return true;
    }
  } else {
    location.href = URI;
    return true;
  }
}

var bgcolors = new Array("", "#FFDDDD");
//----------------------------------------------------------
//  Bgcolor
//----------------------------------------------------------
function chBG(obj, color){
	document.getElementById(obj).style.backgroundColor = bgcolors[color];
	//tagList = document.getElementById(obj).all.tags("td");
	//for (i=0; i<tagList.length; i++){
	//	tagList[i].style.backgroundColor = bgcolors[color];
	//}
}




///////////////////////////////////////////////////////////////
//チェックボックスまとめてON/OFF
// 全て選択押下処理
function fnc_all_click(objAll){

	// 全ての要素に対して
	for(var i=0;i<document.sample.length;i++){
		//チェックボックスであれば
		if(document.sample[i].type=="checkbox"){
			document.sample[i].checked = objAll.checked;
		}
	}

}

// 全て選択以外の押下処理
function fnc_mbr_click(objMbr){

	// チェックボックスのチェックが外れたら『全て選択』のチェックを外す
	if(objMbr.checked == false){
		document.sample.chk99.checked = false;
		return;
	}

	for(var i=0;i<document.sample.length;i++){
		//チェックボックスであれば
		if(document.sample[i].type=="checkbox"){
			// 『全て選択』以外全てチェックされていたら
			// 『全て選択』をチェックする
			if(document.sample[i].checked==false
			                 &&
			   document.sample[i].name!="chk99"){
				return;
			}
		}
	}

	document.sample.chk99.checked = true;

}
