﻿function showCalendarWin() {
    var CalUrl
    var chkSE = "flight";
    var Des = document.getElementById("Destination").value;
    if (Des == "") {alert("נא בחר יעד לנסיעה \n יעד שדה חובה");return false;}
    CalUrl = "../lib/calendarNet/setParam.asp?Des=" + Des + "&flddepDate=frmSE.tbFromDate&CurDate=&fldReturnDate=frmSE.tbReturnDate&ReturnDate=&Dep=" + chkSE;
    window.open(CalUrl, "CalWin", "width=550,height=470,resizable=yes,left=200,top=0");
}
function Search_Click() {
    if (document.getElementById("Country").value == "0") {alert("נא בחר מדינה");document.getElementById("Country").focus();return false;}
    if (document.getElementById("Destination").value == "") { alert("נא בחר יעד"); document.getElementById("Destination").focus(); return false; }
    var Country = document.getElementById("Country").value;
    var des = document.getElementById("Destination").value;
    var depDate = document.getElementById("tbFromDate").value;
    var ReturnDate = document.getElementById("tbReturnDate").value;
    var link = "http://www.ypaymore.co.il/flight/Flights-search.aspx?DES=" + des + "&Country=" + Country + "&Dep=package&depDate=" + depDate + "&ReturnDate=" + ReturnDate;
    SearchWin = window.open(link, '_self');
    SearchWin.focus();

}
function GetDestinationCmb() {
     $.post('http://www.ypaymore.co.il/NetServices/GetDestinationsCmb.aspx',
        {
            MainDep: "flight",
            country: document.getElementById("Country").value
        },
        function (data) {
            $("#divDes").html(data);
        }
        );
}


