<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<jsp:useBean id="TAU102" class="com.csc.library.system.Task" scope="page" />
<%
	TAU102.setChannel(request,response);
	UIManager screen = (UIManager) TAU102.process("MultiEntry","TAU102");	
	MultiLine multi = screen.getMultiLine("MTIME1");
	multi.setLabelBox("check box");
	multi.goFirst();
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../JS/SCREEN.js"></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script type='text/javascript' src='../JS/VIEWCALENDAR.js'></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function addMulti(){
	with(document.cscform){
	     window.open("TAU102.jsp?__cmd=&__gorec=&__ack=add"+
	     	"&__companyid="+window.parent.cscform.__companyid.value+
			"&__codeid="+window.parent.cscform.__codeid.value);
	}
}

function deleteMulti(){
	with(document.cscform){
		bCon=confirm("ต้องการลบข้อมูลหรือไม่ ?");
	 	if (bCon==true)	{
			__cmd.value="DelChild";
			submit();
		}
	}
}

function saveChild(){
	with(document.cscform){
		__cmd.value="addChild";
		__ack.value="add";
		action="TAU102.jsp";
		submit();
	}
}

function childMulti(record){
	with(document.cscform){
		window.open(__childMulti.value+".jsp?__cmd=&__gorec="+record+
			"&__ack=edit&__codeid="+window.parent.cscform.__codeid.value+
	    	"&__companyid="+window.parent.cscform.__companyid.value);
			//submit();
	}
}

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function goHelp(helpName,inputName){
 	with(document.cscform){
		var helpReturn="";
		var fcon=__fixCon.value;
		if(inputName=="__absentid" )
			helpReturn="__absentid:absentid,tabsentdate0@absentid";
		if(fcon=="")
	     	linkHelp_Return(helpName,helpReturn);
	    else
	     	helpPageCon(helpName,helpReturn,fcon);
	}
}

function getParam(){
 	with(document.cscform){
    	__absentid.value="<%=request.getParameter("__absentid")%>";
		__absent_date.value="<%=request.getParameter("__absent_date")%>";
		__remark.value="<%=request.getParameter("__remark")%>";
   }
}

function submitiframe(){
	document.detail1.document.cscform.__time0id.value=window.cscform.__time0id.value;
  	document.detail1.document.cscform.__edesc.value=window.cscform.__edesc.value;
	document.detail1.document.cscform.__tdesc.value=window.cscform.__tdesc.value;
  	document.detail1.document.cscform.__refer.value=window.cscform.__refer.value;
  	document.detail1.document.cscform.__help.value="__time0id#"+window.cscform.__time0id.value+";__companyid#"+window.cscform.__companyid.value;
  	document.detail1.document.cscform.__fixCon.value=" time0id ='"+window.cscform.__time0id.value+"' "; 
}

function GoSave(){
	if (document.cscform.__time0id.value=="") {
		alert(MyCode[0]);
		document.cscform.__time0id.focus();
	} else {	
		if(document.cscform.__pageIframe.value=="TAU103.jsp"){
			//if( document.detail1.chk_Time()&& document.detail1.chk_Time2()){
				bCon=confirm(MyCode[1]);		
				if (bCon==true)	{
					//document.detail1.chk_RTime(); 
					//document.detail1.hour_dBeSave() ;
					document.detail1.document.cscform.__cmd.value="save";
					submitiframe();
					document.detail1.document.cscform.submit();
				}
			//}
		}else if(document.cscform.__pageIframe.value=="TAU104.jsp"){
			bCon=confirm(MyCode[1]);	
			if (bCon==true)	{   
				document.detail1.document.cscform.__cmd.value="save";
				submitiframe();
				document.detail1.document.cscform.submit();
			}
		}
	}//end check null key
}

function GoUpdate(){
	if(document.cscform.__pageIframe.value=="TAU103.jsp"){
 		if( document.detail1.chk_Time()&& document.detail1.chk_Time2()){
			bCon=confirm(MyCode[3]);
			if (bCon==true)	{
				//document.detail1.chk_RTime(); 
				//document.detail1.hour_dBeSave() ;
				document.detail1.document.cscform.__confirm.value="2";
				document.detail1.document.cscform.__cmd.value="save";
				submitiframe();
				document.detail1.document.cscform.submit();
			}
   		}
  	}else if(document.cscform.__pageIframe.value=="TAU104.jsp"){
		bCon=confirm(MyCode[3]);
		if (bCon==true)	{
			document.detail1.document.cscform.__confirm.value="2";
			document.detail1.document.cscform.__cmd.value="save";	
			submitiframe();
			document.detail1.document.cscform.submit();
		}
  	}   
}

function refreshIframe(){
	if(document.cscform.__time0id.value.length>0){
		submitiframe();
		document.detail1.document.cscform.__cmd.value="search"; 
		document.detail1.document.cscform.submit();
	}
}

function goIframe(page){
	document.detail1.document.cscform.__help.value="__time0id#"+window.cscform.__time0id.value+";__companyid#"+window.cscform.__companyid.value;
   	with(document.cscform){ 
		__pageIframe.value=page;	
	 	__help.value="__time0id#"+__time0id.value+";__companyid#"+__companyid.value;	 
		submit();
  	}  
}

function GoDelete(){ edelete(); }
function GoSearch(){ search(); }

</script>
</head>

<body leftmargin="0" topmargin="0" onLoad="refreshIframe();" >
<form name="cscform" method="post" action="TAU102.jsp">


<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<input type="hidden" name="__cmd" value="">
	<input type="hidden" name="__calendar">
	<script language="javascript">getInputFormatDate();</script>
	<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>'">
	<input type="hidden" name="__notNull" value='<%=screen.getRequire()%>'>
	<input type="hidden" name="__screen" value="TAU102">
	<input type="hidden" name="__help" value="">
	<input type="hidden" name="__childMulti" value="TAU102">
	<input type="hidden" name="__gorec" value="">
	<input type="hidden" name="__ack" value="">
	<input type="hidden" name="__multiTable" value="MTIME1">
	<input type="hidden" name="__helpReturn" value="">
	<input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
	<input type="hidden" name="__employeeid" value="<%=screen.getUProfile().get("actor")%>">
	<input type="hidden" name="__fixCon" value=" status='0' ">
	<input type="hidden" name="__pageIframe" value="<%=TAU102.getValue("pageIframe")%>">
	<input type="hidden" name="__status" value="0">
<div align="center">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
     <script src="../JS/HOTKEY.js"></script>
<script language="javascript"> 
	var titlename=swap2String('Define Time Table'); 
	document.write(Icons("TAU102,"+titlename)); 
</script>
</div>
<br>
  <div align="center">      
    <table border ="0" cellpadding="0" cellspacing="0">
      <tr> 
        <td class="header"> TAU102, &nbsp;<script language="javascript">swapLang("Define Time Table");</script>&nbsp;</td>
      </tr>
      <tr> 
        <td  > 
          <div align="center"> 
            <center>
              <table  border="0" class="maxsize">
             
                <tr>                
                  <td  valign="top" colspan="2"> 
                    <table  class="maxsize" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td  valign="top">
						<table width="117%" height="60" border="0" cellpadding="0" cellspacing="0" class="maxsize" >
                            <tr> 
                              <td height="20" nowrap class="columnlabel"><%=screen.getLabel("time0id")%>&nbsp;</td>
                              <td ><%=screen.getInput("time0id")%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                <%=screen.getLabel("refer")%>&nbsp;<%=screen.getInput("refer")%> 
                              </td>
                            </tr>
                            <tr> 
                              <td height="20" nowrap class="columnlabel"><%=screen.getLabel("tdesc")%>&nbsp;</td>
                              <td><%=screen.getInput("tdesc")%> </td>
                            </tr>
                            <tr> 
                              <td height="20" nowrap class="columnlabel"><%=screen.getLabel("edesc")%>&nbsp;</td>
                              <td><%=screen.getInput("edesc")%> </td>
                            </tr>
                          </table></td>
                        <td width="23%" valign="top">
						<!--table width="77%" border="0" cellpadding="0" class="inner2">
                            <tr> 
                              <td width="83%" height="62" align="center" valign="top"><img src="IMAGES/BUTTON/SWAP/DEL_SWAP24.gif" width="55" height="57" border="1" align="right"></td>
                          
                              <td width="17%" align="left" valign="top">
							   <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image20','','images/button/swap/upoad_swap20.gif',1)" onClick="window.open('PRU017.html',left='100',width='500',height='100')">
							   <img src="IMAGES/BUTTON/MAIN/UPOAD20.gif" alt="Browe picture for upload" name="Image20" width="20" height="20" border="0" align="absmiddle"></a> 
							   <br>    
							     <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','images/button/swap/del_swap20.gif',1)"> 
                                <img src="IMAGES/BUTTON/MAIN/DEL20.gif" alt="Delete" name="Image21" width="20" height="20" border="0" align="absmiddle"></a></td>
                            </tr>
                          </table--></td>
                      </tr>
                    </table>
                    </td>
                </tr>
       <tr> 
            <td  class="row1"  width="50%">
			<%if(!TAU102.getValue("pageIframe").equals("TAU103.jsp")){%>
			<a href="javascript:goIframe('TAU103.jsp');"><div align="center"><script language="javascript">swapLang("Time Setting");</script></div></a>
			<%}else{%>
			<div align="center"><script language="javascript">swapLang("Time Setting");</script></div>
			<%}%>
			</td>
			<td  class="row1"  width="50%">
			<%if(!TAU102.getValue("pageIframe").equals("TAU104.jsp")){%>
			<a href="javascript:goIframe('TAU104.jsp');"><div align="center"><script language="javascript">swapLang("Conditions");</script></div></a>
			<%}else{%>
			<div align="center"><script language="javascript">swapLang("Conditions");</script></div>
			<%}%>			
            </td>
          </tr>
		    
				  <tr> 
                  <td colspan="2">
				  <div align="center">
                      <iframe frameborder="0" height="255" width="700"  src="<%=TAU102.getValue("pageIframe")%>" marginwidth="0" name="detail1"></iframe>
                    </div></td>
                </tr>
              </table>
            </center>
          </div></td>
      </tr>
      <tr > 
	  <tr><td class="blankspace"></td></tr>
      <tr > 
        <td class="bottom"></td>
      </tr>
    </table>
    
  </div>


<!----------BEGIN CSC ENDING ZONE ------------------------>

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</body>
</html>