
<style>
#myParamsDiv {
  position: absolute;  
  z-index: 119;
  background-color: white; /* #f1f1f1;  */
 background-color: #e6e6e6;
  text-align: center;
  float:center;
  margin:0px auto;
  font-weight:bold;
  left: 50%;
  top: 50%;
 /* border: 2px solid #b3b3b3; */
  border-radius:5px;
  transform: translate(-50%,-50%);
/*  border:1px solid #8c8c8c; */
  
  -moz-box-shadow: 0 0 5px 3px #888;
  -webkit-box-shadow: 0 0 3px 5px#888;
  box-shadow: 1px 1px 8px #707070 ; 
 
}

#myParamsDivheader {
  font: 24px 'Open Sans Condensed', Verdana, sans-serif;  
  color: #404040;
  font-style: normal;
  font-weight: 600;	
  background-color:#229954 ; /* #e60000; MidnightBlue */
  padding: 5px 10px 5px 10px;
  cursor: move;
  z-index: 120;
  border-bottom: 1px solid #991f00;
  color: #fff;
  border-radius:5px 5px 0px 0px;
}

#myParamsDivfooter {
  padding-top: 30px auto;
  padding-right: 30px ;
  z-index: 120;
  background-color: #f1f1f1;
  color: #fff;
  border-top: 1px solid #d3d3d3;
  height:50px;
   padding-top: 8px;
   padding-right: 8px;
}
 
#myParamsDivfooter a.button { float:right; margin-right:5px;text-align:center;}

#myParamsDiv .close {float:right;color:white;opacity:80%;}
#myParamsDiv .close:hover {float:right;color:white;opacity:100%;
}

.h30{ height:30px; line-height:10px;}
.w10{ width:10px;text-align:center; }

.hm_label {
	width:20%;
	text-align:center;
	background-color:#98AFC7;
	color:white;	
	height:28px;
	border:1px solid gray;
}

</style>

<?php 
$isActiveChk=0; 
$FtpServerFolder="";
$show_recs_no=100;
?>
 
 <div id="myParamsDiv" style="width:40%" hidden >
  <div id="myParamsDivheader">ΕΠΙΛΟΓΗ ΚΡΙΤΗΡΙΩΝ ΛΙΣΤΑΣ
     <span onclick="document.getElementById('myParamsDiv').style.display='none'" class="close" >&#x2716;</span>
  </div>
    <div>
        <br>
		 <table border="1" class="label_right" style="width:95%;margin:10px auto;"">
 
 		<tr>
			<td width="50%" ><label for="FtpServerFolder">Directory Folder</label></td>
			<td  colspan="2"><input type="text" id="FtpServerFolder" name="FtpServerFolder" value="<?php echo $FtpServerFolder;?>"></td>
		</tr>
		 
		<tr>
			<td style="width:50%;"><label for="FtpServerFolder">Εμφάνιση όλων</label></td>
			<td  style="padding-top:0px;margin:0px; ">
				 <input  type='checkbox' id="isActiveChk" name="isActiveChk"  <?php echo $isActiveChk ?> onclick="javascript:chkUpd('isActive');"  />
			</td>
			<td></td>
		</tr>
 		<tr>
			<td style="width:50%;"><label for="FtpServerFolder">Εμφάνιση </label></td>
			<td  style="padding-top:0px;margin:0px; ">
				 <input  type='checkbox' id="isActiveChk" name="isActiveChk"  <?php echo $isActiveChk ?> onclick="javascript:chkUpd('isActive');"  />
			</td>
			<td></td>
		</tr>
		<tr>
			<td style="width:50%;"><label for="FtpServerFolder">Εμφάνιση τελευταίων εγγραφών</label></td>
			<td  ><input type="text" id="FtpServerFolder" name="FtpServerFolder" value="<?php echo $show_recs_no;?>"></td>
			<td>εγγραφών</td>
		</tr>		
		</table>
	
		 
		 <table border="0" width="100%" >
			<tr>
		    <td  width="10%"></td>
				<td class="hm_label">ΑΠΟ</td><td width="5%"> </td> <td class="hm_label"> ΕΩΣ </td> 		   
			<td width="10%"> </td>
			</tr>
		  
		   <tr>
		    <td  width="10%"></td>
			<td>
				<div class="vscombo-div" >
				  <input class="c datepicker"  type="text" id="HmApo" name="HmApo" value="<?php echo $HmApo;?>" >
				  <a class="vscombo_date_button" name="Hmnia_Button" id="Hmnia_Button" ></a>
				</div>			
			</td> 
		    <td  > </td>
		    <td>
			<div class="vscombo-div" >
			  <input class="c datepicker" " type="text" id="HmEos" name="HmEos" value="<?php echo $HmEos;?>" >
			  <a class="vscombo_date_button" name="Hmnia_Button" id="Hmnia_Button" ></a>
			</div>			 
			</td>		   
			<td width="10%"> </td>
		  </tr>
		 </table>
	</div>
   
    <div style="padding: 0px 0px 20px 0px;">
		<br>
 
		<p>
		<a href="javascript:cal_update('day');" class="button "> Σήμερα </a>
		<a href="javascript:cal_update('week');" class="button "> Τρέχουσα Εβδομάδα </a>
		<a href="javascript:cal_update('month');" class="button "> Τρέχων Μήνας </a>
		<a href="javascript:cal_update('year');" class="button "> Τρέχον Ετος </a>
		</p>
	</div>
 
	  
	<div id="myParamsDivfooter" style="background-color:#f1f1f1;">
	      <a href="javascript:HideParamsDiv();" class="button red" style="float:right;margin-left:5px;"> Άκυρο </a>
	      &nbsp;&nbsp;
	     <a  id="ok_button"  class="button green" style=" float:right;width:180px;">  Εντάξει</a>
	</div>
 
 
</div>
 
<script language="JavaScript" type="text/JavaScript">
 
var m_prefix="", m_btn="", btn="", cmd="";
var c_HmApoName="", c_HmEosName="", HmApo, HmEos;

var m_period_type="week";
document.addEventListener('click', function(e) {
    e = e || window.event;
    var target = e.target || e.srcElement,
          text = target.textContent || target.innerText;

 if(e.target.id=="ok_button"){ ok_btn_pressed();return; }
 
var a = e.target.id;var b=a.split("@");
	if(b.length<=1){return;}
	
	if(b[0]!=""){
		m_prefix=b[0]; a=b[1]; btn=b[1]; a=a.split("_");
		//if(a.length<=1){return;}
		 cmd=a[1];
	}

//alert(btn);	
m_btn=e.target.id;
m_prefix=m_prefix.concat("@");
c_HmApoName=m_prefix.concat("HmApo");
c_HmEosName=m_prefix.concat("HmEos");
HmApo = getCookie(c_HmApoName); 
HmEos = getCookie(c_HmEosName); 

// alert(e.target.id+ " ==== " + b[0] + " == " + b[1] + "   btn=" + btn + "   command: " + cmd);
 
  if(btn==""){return;}
  if(btn=="FindWhat"){return;}
  if(btn=="cboRecPP"){return;}
  if(btn=="calendar_select"){ShowDateDiv();return;}  	  
  if(cmd!='next' && cmd!='prv'){ document.cookie = m_prefix+'period_type=' + cmd; }

   m_period_type=getCookie(m_prefix.concat("period_type"));
   
   updDates(cmd);
 		
}, false);


dragElement(document.getElementById("myParamsDiv"));

function dragElement(elmnt) {
  var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  if (document.getElementById(elmnt.id + "header")) {
    /* if present, the header is where you move the DIV from:*/
    document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
  } else {
    /* otherwise, move the DIV from anywhere inside the DIV:*/
    elmnt.onmousedown = dragMouseDown;
  }

  function dragMouseDown(e) {
    e = e || window.event;
    e.preventDefault();
    // get the mouse cursor position at startup:
    pos3 = e.clientX;
    pos4 = e.clientY;
    document.onmouseup = closeDragElement;
    // call a function whenever the cursor moves:
    document.onmousemove = elementDrag;
  }

  function elementDrag(e) {
    e = e || window.event;
    e.preventDefault();
    // calculate the new cursor position:
    pos1 = pos3 - e.clientX;
    pos2 = pos4 - e.clientY;
    pos3 = e.clientX;
    pos4 = e.clientY;
    // set the element's new position:
    elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
    elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
  }

  function closeDragElement() {
    /* stop moving when mouse button is released:*/
    document.onmouseup = null;
    document.onmousemove = null;
  }
}

// =============================================
//
// =============================================
function cal_update(cmd){
	document.cookie = m_prefix+'period_type=' + cmd;updDates(cmd);
}

 

function ok_btn_pressed(){
    document.cookie = m_prefix+'HmApo=' + document.getElementById("HmApo").value;
    document.cookie = m_prefix+'HmEos=' + document.getElementById("HmEos").value;  
	document.location.reload(true);	
}

 
 
 
function ShowParamsDiv(){
  document.getElementById('myParamsDiv').style.display='block' ;
  document.getElementById('HmApo').focus();
}

function HideParamsDiv(){
  document.getElementById('myParamsDiv').style.display='none'
}
</script>
