﻿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 = "SPORT";
    if (document.getElementById("Category").value == "2") { Dep = "CONCERT" }
    
    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 (radioButtons[1].checked){
        link = "http://www.netravel.co.il/se/?MainDep=ACTIVE HOLIDAYS&amp;Des=" + document.getElementById("Destination").value + "&amp;Country=" + document.getElementById("Country").value;
        link = link + "&amp;Destination=" + document.getElementById("Destination").value;
    }
    else {
        link = "http://www.netravel.co.il/se/?Dep=SHOWS AND FOLKLORE&amp;Des=" + document.getElementById("Destination").value + "&amp;Country=" + document.getElementById("Country").value;
        link = link + "&amp;Destination=" + document.getElementById("Destination").value;
    }
    
    SearchWin = window.open(link, "_self");
}