  /*
  *href to another page for using buttons.
  */
  function hrefTo(hrefStr){
    window.location.href = hrefStr;
  }
  /**
 * 新規ウィンドウ遷移用スクリプト1
 * 
 * param1 : 実行するメソッド名
 * param2 : 新規ウィンドウの高さ
 * param3 : 新規ウィンドウの幅
 */
function hrefToNewWin(action,targetName,height,width){
	if(height==null || height==''){
		height=700;
	}
	if(width==null || width==''){
		width=820;
	}
	height = eval(height) + 30;
	var left = 0;
	var top = 0;
	height = eval(height) + 30;
	newWin = window.open(action,targetName ,'width=' + width + ',height=' + height + ',left='+left +',top='+top+',scrollbars=yes,toolbar=no,menubar=no,location=no');
	newWin.focus();
	return newWin;
}
//実行した後に、閉じる
function forwardClose(action){
	document.forms[0].method = "POST";
	document.forms[0].target = "_parent";
	document.forms[0].action = action;
	document.forms[0].submit();
	window.close();
}
function windowClose(){
	window.close();
}



function OpenNewWindow(Target){

//ターゲットの設定 
document.forms[0].target = Target;

//ウインドウの生成
newWin = window.open(Target,"","");

newWin.focus();
			
//生成したウインドウのオブジェクトを返す
//return newWin;   
}

  function parentHrefTo(hrefStr){
    window.parent.location.href = hrefStr;
  }
  /*
  *back to the history page for using buttons.
  */
  function historyBack(){
    window.history.back();
  }
  /*
  *confirm delete action.
  */


  function submitForm(theForm){
      if(!checkForm(theForm)){
        return false;
      }
      theForm.submit();
      return true;
  }

  
  //checkbox全選択
   function sltall(checkstatus){
	  var d = objForm;
	  for(i=0;i<d.elements.length;i++){
		if(d.elements[i].type=="checkbox" && d.elements[i].name!="checkall"){ 
		  d.elements[i].checked = checkstatus;
		}
	  }
	}
  function sltallById(checkstatus,checkedId){
	  var d = objForm;
	  for(i=0;i<d.elements.length;i++){
  		if(d.elements[i].type=="checkbox" && d.elements[i].name!="checkall" && d.elements[i].id==checkedId){ 
	  	  d.elements[i].checked = checkstatus;
		  }
	  }
	}

   function sltallByIdForm1(checkstatus,checkedId){
	  var d = objForm1;
	  for(i=0;i<d.elements.length;i++){
  		if(d.elements[i].type=="checkbox" && d.elements[i].name!="checkall" && d.elements[i].id==checkedId){ 
	  	  d.elements[i].checked = checkstatus;
		  }
	  }
	}
 //チェックボックスチェックした数を取得
  function getCheckSu(checkName){
    var a = document.getElementsByName(checkName);
    var c = 0
    for(var i=0; i<a.length; i++){
      c+= (a[i].checked) ? 1 : 0;
    }
    return c;
  }

   //
  function setPage(page){
	document.getElementById("page").value =page;
    //document.forms[0].page.value=page;
	document.objForm.submit();
 }
  function setLimit(limit){
	document.getElementById("limit").value =limit;
   // document.forms[0].limit.value=limit;
	document.objForm.submit();
 }