function openWindow(url) {
    window.open(url, 'newwindow', config = 'height=600,width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, directories=no, status=no')
}

function openCVN(url) {
    window.open(url, 'newwindow', config = 'height=220,width=320, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, directories=no, status=no')
}

function getCountries(regionid, countryid) {
    objregion = document.getElementById(regionid);
    if (objregion) {
        var val = objregion.options[objregion.selectedIndex].value;
        objcountry = document.getElementById(countryid);
        if (objcountry) {
            for (var i = objcountry.options.length; i >= 0; i--) {
                objcountry.remove(i);
            }
        }

        $jq(document).ready(function() {
            $jq.ajax({
                cache: false,
                url: "/DesktopModules/DNNInfo_TravelPackages/CountryHandler.ashx?rid=" + val,
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "html",
                error: function(xhr, status, error) {
                    //alert the error if needed
                    //alert(xhr.responseText);
                },

                success: function(msg) {
                    countryid = "#" + countryid;
                    $jq(countryid).append(msg);
                }
            });
        });

    }
}

function del(obj) {
    obj.value = "";
}


function getPackageInfo(ddID, displayID) {
    objDD = document.getElementById(ddID);
    if (objDD) {
        var val = objDD.options[objDD.selectedIndex].value;
        $jq(document).ready(function() {
            $jq.ajax({
                cache: false,
                url: "/DesktopModules/DNNInfo_TravelPackages/PackageHandler.ashx?pid=" + val,
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "html",
                error: function(xhr, status, error) {
                    //alert the error if needed
                    //alert(xhr.responseText);
                },

                success: function(msg) {
                displayID = "#" + displayID;
                $jq(displayID).append(msg);
                }
            });
        });

    }
}

function openconverter(url){
	window.open (url, 'newwindow', config='height=210,width=650, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no')
}
