
function isIE(){
   if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    return true;
   else
    return false;
}
//FireFox Add innerText prototype*******
//if(!isIE()){
//   HTMLElement.prototype.__defineGetter__( "innerText",function(){
//     var anyString = "";
//     var childS = this.childNodes;
//    for(var i=0; i<childS.length; i++) {
//      if(childS[i].nodeType==1)
//      anyString += childS[i].tagName=="BR" ? '\n' : childS[i].innerText;
//      else if(childS[i].nodeType==3)
//       anyString += childS[i].nodeValue;
//     }
//     return anyString;
//    }
//   );
//   HTMLElement.prototype.__defineSetter__("innerText",
//    function(sText){
//     this.textContent=sText;
//    }
//   );
//}
//*****************************************


submited = false;

function Rollback(Str){
	document.post_form.action=Str;
	document.post_form.submit();
}

function RepRollback(Str){
	document.post_form.action=Str;
	var tempstr = document.post_form.Detail.value;
	document.post_form.Detail.value = tempstr.replace(/<br>/g,"\r\n");
	document.post_form.submit();
}

function RegUser(){
	document.post_form.OperFlag.value='1';
	submited = true;
}

function UpdateMgr(){

	document.post_form.OperFlag.value='update';
	document.post_form.submit();

}

function DeleteMgr(){
	document.post_form.OperFlag.value='delete';
	document.post_form.submit();
}


function RollbackMgr(Str){
	document.post_form.action=Str;
	document.post_form.submit();
}

function LoginSubmit(){
	document.form_login.submit();
}

function getPwdSubmit(){
	document.post_form.submit();
}

function setPwdSubmit(){
	document.post_form.submit();
}

function RegUserInputSubmit(){
	document.RegUser_form.submit();
}


function FormSubmit(){
	document.post_form.submit();
}

function autoDetail(UName){
	var Stateval = document.getElementById("Status").options[document.getElementById("Status").selectedIndex].value;
	var str= UName + "　様\n\n";
	if(Stateval=='0'){
		str+="";
	}else if(Stateval=='1'){
		str+="報告されたバグ情報は、確認いたしましたが、\n";
		str+="残念ですが、今回はバグ情報として認証がされませんでした。\n";
		str+="今後ともバグ・ハンターをご利用ください。";
	}else{
		str+="おめでとうございます。\n";
		str+="報告されたバグ情報が認証されました。\n";
		str+="ポイントが加算されましたのでご確認ください。\n";
		str+="今後ともバグ・ハンターをご利用ください。";
	}
	if(isIE()){
			document.getElementById("Detail").innerText=str;
		}else{
			document.getElementById("Detail").textContent=str;
		}
}
