<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html;CHARSET=Shift_JIS">
<%	
//====================================================================
//JMSS ASP Project include file for JavaScript
//====================================================================
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
//01.03.30 NN
jbno="<%if(!Request("JOB_NO").Count)Response.Write("0");else Response.Write(Request("JOB_NO"));%>";
pjbno="<%if(!Request("PJOB_NO").Count)Response.Write("0");else Response.Write(Request("PJOB_NO"));%>";
njbno="<%if(!Request("NJOB_NO").Count)Response.Write("0");else Response.Write(Request("NJOB_NO"));%>";
pgno=<%if(!Request("PAGE_NO").Count)Response.Write("0");else Response.Write(Request("PAGE_NO"));%>;
lgtype="<%if(!Request("logtyp").Count)Response.Write("0");else Response.Write(Request("logtyp"));%>";
//

winclf  = 1;
jobinW  = null;
jobconW = null;
stdoutW = null;
listW   = null;
childW  = null;
jnetW   = null;
//jcntW   = null;//99.10.21

str_disp=new Array("hWuꗗ(JLook)","Wulbg(JLook)","JMSS HTML(JLook_JOB)","ԕύX(JLook)","Wo͕\\(JLook)","Wuڍ׏(JLook)");

function JobIn(){	//gp
	//00.02.28
	strString = "JLJobIn/JLJobIn.asp?";
	strString += "LGONUSER=<%=Request("LGONUSER")%>&";
	strString += "TSERVER=<%=Request("TSERVER")%>";//00.02.03
	//
	if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
	else{
		if(winclf==1){
			cf=winclose(0,1);//01.04.25
			if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
				alert("I[v"+str_disp[cf-4]+"ʂI܂B");
		}
	}
	jobinW=window.open(strString,"JLJobIn","scrollbars=yes,width=490,height=430");//00.02.28
}

function JobControl(action,jobno,souce,text){	//gp
//	if(confirm("ԂύX܂H")==true){
		if(souce==1)
			strString = "action.asp?";
		else
			strString = "action.asp?";
		strString += "JOB_NO=";
		if(text==0)
			strString += jobno;
		else
			strString += text;
		strString += "&ACTION=";
		strString += action;
		strString += "&TERM=999";
//		if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
//		else{
//			if(winclf==1){
//				cf=winclose(0);
//				if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
//					alert("I[v"+str_disp[cf-4]+"ʂI܂B");
//			}
//		}
		location.replace(strString);
//		jobconW=window.open(strString,"JAction","resizable=no,width=200,height=100");
//	}
}

function initJob(jobno,jobname,souce,jsts){	//jlook\joblog\default.asps, COMHTMLWJ
//	if(confirm("Wo͂\\܂H")==true){
		if(souce==1)
			strString = "stdout.asp?END_JOB=0&JOB_NO=";
		else
			strString = "stdout.asp?END_JOB=<%=Request("JOB_NO")%>&JOB_NO=";
		strString += jobno;
		strString += "&JOB_STS="+jsts;
		if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
		else{
			if(winclf==1){
				cf=winclose(0,1);//01.04.25
//				if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
//					alert("I[v"+str_disp[cf-4]+"ʂI܂B");
			}
		}
//		location.replace(strString);
		x=(screen.width -550)/2;
		y=(screen.height-400)/2;
		stdoutW=window.open(strString,"JLStdout","scrollbars=yes,width=550,height=400");
		if(stdoutW){//01.05.10 nullȂ
		stdoutW.moveTo(x,y);//01.04.26
		stdoutW.focus();//01.04.25
		}
//	}
}

function JobList(jobno,souce,quename,jsts,action){	//COMHTMLWJ
//	if(confirm("ڍ׏\\܂H")==true){
		if(souce==1)
			strString = "prop.asp?EJ=0&JN=";
		else
			strString = "prop.asp?EJ=<%=Request("JN")%>&JN=";
		strString += jobno;
		strString += "&JQ="+quename;//01.03.29
		strString += "&JS="+jsts;
		strString += "&ST="+action;
		strString += "&command=noset";
		strString += "&logtyp="+lgtype;//01.02.22 Log Typeɂԕ\Ή.
		if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
		else{
			if(winclf==1){
				cf=winclose(0,1);//01.04.25
//				if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
//					alert("I[v"+str_disp[cf-4]+"ʂI܂B");
			}
		}
//		location.replace(strString);
		x=(screen.width -500)/2;
		y=(screen.height-360)/2;
		listW=window.open(strString,"JLList","scrollbars=yes,width=500,height=360");
		if(listW){//01.05.10 nullȂ
		listW.moveTo(x,y);//01.04.26
		listW.focus();//01.04.25
		}
//		if(navigator.appName.charAt(0)=="N"){
//			strParam ="http://"+document.location.host+"<%//=Request.ServerVariables("URL")%>?";
//			if(jbno.length)
//				strParam += "JOB_NO="+jbno+"&PJOB_NO="+pjbno+"&NJOB_NO="+njbno+"&PAGE_NO="+pgno+"&";
//			strParam += "logtyp="+lgtype+"&nnstay=1";
//			location.replace(strParam);
//		}
//	}
}

function JobChildDisp(jobno,jobname,souce,jsts){	//COMHTMLWJAgp̂͂
//	if(confirm("hWu\\܂H")==true){
		if(souce==1)
			strString = "END_JOB=0&JOB_NO=";
		else
			strString = "END_JOB=<%=Request("JOB_NO")%>&JOB_NO=";
		strString += jobno;
		strString += "&JOB_STS="+jsts;
		if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
		else{
			if(winclf==1){
				cf=winclose(0,1);//01.04.25
//				if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
//					alert("I[v"+str_disp[cf-4]+"ʂI܂B");
			}
		}
		window.open("menu.asp?"+strString,"menu");
		location.replace("default.asp?"+strString);
//	}
}

function JobNet(jobno,jobname,souce,jsts){	//jlook\joblog\default.asps, COMHTMLWJ
	var Client_msg="Wulbg󋵂\\܂H\n\nӎF\nUNCŃt@CwsĂ̂Ȃ\n{WebNCAgZbgAbv\nɂWulbgɂĂ͕\\\nꍇ܂ȂɂĂ\n\\ł܂";
	if(navigator.appName.charAt(0)!="N"){
//		if(confirm(Client_msg)==true){
			if(souce==1)
				strString = "jobnet.asp?TOP_JOB=0&JOB_NO=";
			else
				strString = "jobnet.asp?TOP_JOB=<%=Request("JOB_NO")%>&JOB_NO=";
			strString += jobno;
			strString += "&JOB_STS="+jsts;
			if(navigator.appName.charAt(0)!="N")
				strString += "&WEBTYP=0";
			else
				strString += "&WEBTYP=1";
			if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3){}
			else{
				if(winclf==1){
					cf=winclose(0,1);//01.04.25
//					if(/*navigator.appName.charAt(0)!="N" &&*/ cf>=4)
//						alert("I[v"+str_disp[cf-4]+"ʂI܂B");
				}
			}
//			location.replace(strString);
			x=(screen.width -650)/2;
			y=(screen.height-440)/2;
			jnetW=window.open(strString,"JLJobnt","scrollbars=yes,width=650,height=440");
			if(jnetW){				//01.05.10 nullȂ
				jnetW.moveTo(x,y);	//01.04.26
				jnetW.focus();		//01.04.25
			}
//		}
	}
	else{
		alert("Wulbg\\́AInternet ExplorerȊO\nuEUł͂pɂȂ܂B\n(Internet Explorer4.0ȏ̊łpɂȂ܂B)");
	}
}

function LoadCall(theForm){	//gp
	window.open("../JmssCnt.asp?UNBER=2&LGONUSER=<%=Request("LGONUSER")%>&TSERVER=<%=Request("TSERVER")%>","TEND");
//	if(navigator.appName.charAt(0)!="N")
//	 jcntW=window.open("../JmssCnt.asp?UNBER=2&LGONUSER=<%=Request("LGONUSER")%>&TSERVER=<%=Request("TSERVER")%>","JCnt","resizable=no,width=550,height=450");
//	else
//	 jcntW=window.open("../JmssCnt.asp?UNBER=2&LGONUSER=<%=Request("LGONUSER")%>&TSERVER=<%=Request("TSERVER")%>","JCnt","resizable=no,width=550,height=350");
}

function winclose(func,defclf) {	//jlook\joblog\default.asp,menu.asps
	if(navigator.appName.charAt(0)!="N" && navigator.appVersion.charAt(0)<=3)
		return func;
	if(defclf==0)//01.04.25
//	if(winclf==0)
		return func;
	if(func==0){
		if(childW) {
			if(childW.closed==false){
				childW.close();
				func=4;
			}
			childW   = null;
		}
//		if(jnetW) {
//			if(jnetW.closed==false){
//				jnetW.close();
//				func=5;
//			}
//			jnetW   = null;
//		}
	}
//	if(func==2){
//		if(jnetW) {
//			if(jnetW.closed==false){
//				jnetW.close();
//				func=5;
//			}
//			jnetW   = null;
//		}
//	}
	if(jnetW) {//99.02.25
		if(jnetW.closed==false){
			jnetW.close();
			func=5;
		}
		jnetW   = null;
	}
	if(jobinW) {
		if(jobinW.closed==false){
			jobinW.close();
			func=6;
		}
		jobinW   = null;
	}
	if(jobconW) {
		if(jobconW.closed==false){
			jobconW.close();
			func=7;
		}
		jobconW   = null;
	}
	if(stdoutW) {
		if(stdoutW.closed==false){
			stdoutW.close();
			func=8;
		}
		stdoutW   = null;
	}
	if(listW) {
		if(listW.closed==false){
			listW.close();
			func=9;
		}
		listW   = null;
	}
//	if(jcntW) {//99.10.21
//		if(jcntW.closed==false){
//			jcntW.close();
//			func=10;
//		}
//		jcntW   = null;
//	}
	return func;
}

function urldec(cstr){	//???
	wstr1 = "";
	wstr2 = "";
	wstr1 = cstr;
	i = 0;
	while(cstr.length != i){
		if(wstr1.charAt(i) == '%'){
			i++;
			c1 = wstr1.charAt(i++);
			c2 = wstr1.charAt(i++);
			if(c1.toUpperCase() >= 'A')
				c1 = c1.toUpperCase() - 'A' + 10;
			else
				c1 -= '0';
			if(c2.toUpperCase() >= 'A')
				c2 = c2.toUpperCase() - 'A' + 10;
			else
				c2 -= '0';
			wstr2 += (c1 << 4) | c2; 
		}
		else{
			if(wstr1.charAt(i) == '+'){
				i++;
				wstr2 += ' ';
			}
			else
				wstr2 += wstr.charAt(i);
		}
		i++;
	}
	cstr = wstr2;
}

//-->
</SCRIPT>
