﻿function showCalendarWin() {
    var CalUrl
    var Des = document.getElementById("Destination").value;
    var Count = document.getElementById("Country").value;
    var CurDate = document.frmSE.tbFromDate.value;
    var ReturnDate = document.frmSE.tbReturnDate.value;
    var Dep = "ACTIVE HOLIDAYS";
    if (document.getElementById("Category_1").checked==true) { Dep = "SHOWS AND FOLKLORE" }
    if (Des != "0") { //document.frmSE.submit();
    } else {alert("נא בחר יעד לנסיעה");return false;}
    CalUrl = "../../lib/calendarNet/CalendarNetW.aspx?Des=" + Des + "&flddepDate=frmSE.tbFromDate&CurDate=" + CurDate + "&fldReturnDate=frmSE.tbReturnDate&ReturnDate=" + ReturnDate + "&Dep=" + Dep;
    window.open(CalUrl, "CalWin", "width=550,height=300,resizable=yes,left=130,top=50");
}

function CheckData() {
    var ans = "";
    if (document.getElementById("Country").value == "0") {ans = "נא בחר מדינה \n";}
    if (document.getElementById("Destination").value == "0") {ans = ans + "נא בחר יעד \n";}
    if (ans != "") {alert(ans);return false;}
    var link = "";
    var radioButtons = document.getElementsByName("Category");
    if (document.getElementById("Category_0").checked == true) {
        link = "http://www.netravel.co.il/se/?MainDep=ACTIVE HOLIDAYS&Des=" + document.getElementById("Destination").value + "&Country=" + document.getElementById("Country").value;
        link = link + "&Destination=" + document.getElementById("Destination").value;
    }
    else {
        link = "http://www.netravel.co.il/se/?Dep=SHOWS AND FOLKLORE&Des=" + document.getElementById("Destination").value + "&Country=" + document.getElementById("Country").value;
        link = link + "&Destination=" + document.getElementById("Destination").value ;
    }
    SearchWin = window.open(link, "_self");
}
