<!--//
function SelectJumpURL(obj) 
{
  url = obj.options[obj.selectedIndex].value;
  if (url != '')
  {
    window.location = url;
  }
}
function _JumpURLnewWin(url,sizeX,sizeY) 
{
  if (url != ''){
    win=window.open(url,"a","scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function _JumpURLnewWinEsc(url,jpstr,sizeX,sizeY) 
{
  if (url != ''){
	jpstr = escape(jpstr);
	url	= url + "&yourname=" + jpstr;
    win=window.open(url,"a","scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function changeImg(iName,img){
	document.images[iName].src=img;
}

function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)){
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver; 
	} 
} 
function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = clrIn; 
	} 
} 

function CSub(objID) {
//     if (document.all.y1(ix).checked == true) {
//         document.all.x1(ix).style.backgroundColor='#C1CDD8';
//     } else {
//         document.all.x1(ix).style.backgroundColor='#FFF7E5';
//     }
	var obj = document.getElementById(objID);
    var tr  = document.getElementById('tr' + objID);
    if (obj.checked) {
        tr.style.backgroundColor='#DAE1E8';
    } else {
        tr.style.backgroundColor='#ffffff';
    }
}

function checkedReverseColor(targetId, targetFormName){

    var check = document.getElementById('allchker');
    for (i=0; i<document.forms[targetFormName].length; i++){
        if (document.forms[targetFormName].elements[targetId+i]){
            if (check.checked==true){
                document.forms[targetFormName].elements[targetId+i].checked = true;
                CSub(targetId + i);
            }else{
                document.forms[targetFormName].elements[targetId+i].checked = false;
                CSub(targetId + i);
            }
        }
    }

}


function formConfirm(type, form) {
	if (type == "insert") {
		rtn = confirm("データを保存します。\nよろしいですか？");
	} else if (type == "update") { // 更新
	    rtn = confirm("データを変更します。\nよろしいですか？");
	} else if (type == "delete") { // 削除
	    rtn = confirm("データを削除します。\n復旧することはできません。\nよろしいですか？");
	} else if (type == "photo") { // 編集
	    rtn = true;
	} else if (type == "confirmset") { // 確認
	    rtn = true;
	} else if (type == "edit") { // 編集
	    rtn = true;
	} else if (type == "approve") { // 確認
	    rtn = true;
	} else if (type == "refuse") { // 編集
	    rtn = true;
	} else if (type == "check") { // 既読処理
	    rtn = true;
	} else if (type == "sendmessage") { // フラグ削除
	    rtn = true;
	} else if (type == "fdelete") { // フラグ削除
	    rtn = true;
	} else if (type == "save") { // 下書き保存
		rtn = confirm("データを保存します。\nよろしいですか？");
	} else if (type == "content") { // 編集
	    rtn = true;
	} else if (type == "detail") { // 詳細
	    rtn = true;
	} else if (type == "sortDesc") { // 詳細
	    rtn = true;
	} else if (type == "sortAsc") { // 詳細
	    rtn = true;
	} else if (type == "back") { // 戻る
	    rtn = true;
	}
	if (rtn) {
        form.action.value = type;
	}else{
		return false;
	}
}
function formModeConfirm(mode,tmode, form) {
    rtn = true;
	if (rtn) {
        form.mode.value = mode;
        form.targetmode.value = tmode;
	}else{
		return false;
	}
}
function formActionPhoto(type, form) {
    if (type == "photoUpload") {    // 写真登録
        if(form.uploadFile.value != '') {
            rtn = true;
        } else {
            alert("画像ファイル名を入力してください。");
            rtn = false;
        }

    } else if(type == "photoDelete") {  // 写真削除
        rtn = confirm("写真を削除します。\nよろしいですか？");

    } else {
        rtn = confirm("よろしいですか？");
    }

    if(rtn){
        form.action.value = type;

    } else {
        return false;
    }
}
//-->
