<html>
<head><!-- <SCRIPT LANGUAGE="JavaScript">

function initdt(mf) {
var t = new Date;
mf.check_in_d.value = t.getDate();
mf.check_in_m.value = t.getMonth() + 1;
mf.check_in_y.value = t.getFullYear();
}
onload="initdt(document.forms['date_form']);" 
</SCRIPT> -->
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="styles.css" type="text/css">
<style type="text/css">@import url(calendar-win2k-cold-2.css);</style>
<script type="text/javascript" src="calendar.js"></script>
<script type="text/javascript" src="lang/calendar-en.js"></script>
<script type="text/javascript" src="calendar-setup.js"></script>
<SCRIPT TYPE="text/javascript">

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}

</SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<?php 
		
	if  ($Submit) {
$CODE='84f0951f7b';
$SITE='18';	

$check_in_d = substr($f_date_a, 5, 2);
$check_out_d = substr($f_calcdate, 5, 2);


$check_in_y = substr($f_date_a, 12, 4);
$check_out_y = substr($f_calcdate, 12, 4);

$find_month1 = substr($f_date_a, 8, 3);
$find_month2 = substr($f_calcdate, 8, 3);


if ($find_month1 == "Jan") {
	$check_in_m = "01";
} else if ($find_month1 == "Feb") {
	$check_in_m = "02";
} else if ($find_month1 == "Mar") {
	$check_in_m = "03";
} else if ($find_month1 == "Apr") {
	$check_in_m = "04";
} else if ($find_month1 == "May") {
	$check_in_m = "05";
} else if ($find_month1 == "Jun") {
	$check_in_m = "06";
} else if ($find_month1 == "Jul") {
	$check_in_m = "07";
} else if ($find_month1 == "Aug") {
	$check_in_m = "08";
} else if ($find_month1 == "Sep") {
	$check_in_m = "09";
} else if ($find_month1 == "Oct") {
	$check_in_m = "10";
} else if ($find_month1 == "Nov") {
	$check_in_m = "11";
} else if ($find_month1 == "Dec") {
	$check_in_m = "12";
}

if ($find_month2 == "Jan") {
	$check_out_m = "01";
} else if ($find_month2 == "Feb") {
	$check_out_m = "02";
} else if ($find_month2 == "Mar") {
	$check_out_m = "03";
} else if ($find_month2 == "Apr") {
	$check_out_m = "04";
} else if ($find_month2 == "May") {
	$check_out_m = "05";
} else if ($find_month2 == "Jun") {
	$check_out_m = "06";
} else if ($find_month2 == "Jul") {
	$check_out_m = "07";
} else if ($find_month2 == "Aug") {
	$check_out_m = "08";
} else if ($find_month2 == "Sep") {
	$check_out_m = "09";
} else if ($find_month2 == "Oct") {
	$check_out_m = "10";
} else if ($find_month2 == "Nov") {
	$check_out_m = "11";
} else if ($find_month2 == "Dec") {
	$check_out_m = "12";
}


$check_in_date=$check_in_y.'-'.$check_in_m.'-'.$check_in_d;
$check_out_date=$check_out_y.'-'.$check_out_m.'-'.$check_out_d;

	?>
<meta http-equiv="refresh" content="0;URL=https://www.hotel.net.gr/bookings/reservations2.php?PERSONS_NO=<?php echo $PERSONS_NO  ?>&check_in_date=<?php echo $check_in_date  ?>&check_out_date=<?php echo $check_out_date ?>&SITE=<?php echo $SITE ?>&CODE=<?PHP echo $CODE ?>&NEXT=OK&START_NEXT=<?php echo $check_in_date  ?>">
	<?php } else { ?>


<table border="0" width="242" cellspacing="3" cellpadding="3" class="txt">
  <form action="<?php echo $PHP_SELF ?>" method="post">
    <INPUT TYPE="hidden" name="PERSONS_NO" value="">
    <INPUT TYPE="hidden" name="check_in_d" value="">
    <INPUT TYPE="hidden" name="check_in_m" value="">
    <INPUT TYPE="hidden" name="check_in_y" value="">
    <INPUT TYPE="hidden" name="check_out_d" value="">
    <INPUT TYPE="hidden" name="check_out_m" value="">
    <INPUT TYPE="hidden" name="check_out_y" value="">
    <INPUT TYPE="hidden" name="SITE" value="41">
    <INPUT TYPE="hidden" name="CODE" value="49e2e2484b">
    <INPUT TYPE="hidden" name="NEXT" value="OK">
    <INPUT TYPE="hidden" name="AVAILABLE" value="">
    <tr> 
      <td align="center" valign="top">Check in Date:<br>
        <input type="text" name="f_date_a" id="f_date_a" class = "txt" value=""/>
        <!-- check out -->
    </tr>
    <tr> 
      <td align="center" valign="top">Check Out Date:<br>
        <input type="text" name="f_calcdate" id="f_calcdate" class = "txt" value=""/>
    </tr>
    <tr> 
      <td align="center" valign="top">Persons Per Room : 
        <select class="txt" name=select size="1">
          <option selected>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
        </select>
        <input type="hidden" name="START_NEXT">
    </tr>
    <tr> 
      <td align="center" valign="top"> 
        <input type="submit"  value="Request" name="Submit" class="txt">
    </tr>
  </form>
</table>
<script type="text/javascript">
    function catcalc(cal) {
        var date = cal.date;
        var time = date.getTime()
        // use the _other_ field
        var field = document.getElementById("f_calcdate");
        if (field == cal.params.inputField) {
            time == field; // substract one week
        } else {
            time += Date.DAY; // add one week
        }
        var date2 = new Date(time);
        field.value = date2.print("%a, %d %b %Y");
    }
    Calendar.setup({
        inputField     :    "f_date_a",
        ifFormat       :    "%a, %d %b %Y",
        showsTime      :    false,
        timeFormat     :    "24",
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_calcdate",
        ifFormat       :    "%a, %d %b %Y",
        showsTime      :    false,
        timeFormat     :    "24",
        onUpdate       :    catcalc
    });
</script>
<?php } ?>
</body>
</html>
