
        var _strHotelCd = "HT04003121";
        var _strPath = "https://v3.reservation-system.net/";


        
        function getTrim(param) {
            var value = param
            while (value.substring(0, 1) == ' ') {
                value = value.substring(1, value.length);
            }
            while (value.substring(value.length - 1, value.length) == ' ') {
                value = value.substring(0, value.length - 1);
            }
            return value;
        }

        function allowNumericOnly(p_objText) {
            var v_regExp = /^\d+$/;
            var v_strTemp;

            with (p_objText) {
                if (value.length < 2) {
                    v_strTemp = value;
                    if (!v_regExp.test(v_strTemp)) value = "";
                }
                else {
                    v_strTemp = value.substring(0, 1);
                    if (!v_regExp.test(v_strTemp)) value = value.substring(1, value.length);

                    v_strTemp = value.substring(value.length - 1);
                    if (!v_regExp.test(v_strTemp)) value = value.substring(0, value.length - 1);

                    if (!v_regExp.test(value)) {

                        v_strTemp = "";
                        for (var v_intCounter = 0; v_intCounter < value.length; v_intCounter++) {
                            if (v_regExp.test(value.substring(v_intCounter, v_intCounter + 1))) v_strTemp += value.substring(v_intCounter, v_intCounter + 1);
                        }
                        value = v_strTemp;
                    }
                }
            }
            return true;
        }

        function fRetrieve() {
            window.location = _strPath + "BE/Index.aspx?hotelcd=" + _strHotelCd + "&mode=retrieve";
        }

        function fSelectCountry(param) {
            var objCity = document.getElementById("slcCity");
            var objHotel = document.getElementById("slcHotel");

            objCity.innerHTML = "";
            objCity.options[0] = new Option("[select city]");
            objCity.options[0].value = "";

            objHotel.innerHTML = "";
            objHotel.options[0] = new Option("[select hotel]");
            objHotel.options[0].value = "";
            objHotel.options[1] = new Option("All Hotels");
            objHotel.options[1].value = "ALL";

            if (param.value != "") {
                var objCountryData = document.getElementById("hdn" + param.value);
                var arrCityData = objCountryData.value.split("|#|");
                for (var i = 0; i < arrCityData.length; i++) {
                    var arrCityDtl = arrCityData[i].split("|~|");
                    objCity.options[i + 1] = new Option(arrCityDtl[1]);
                    objCity.options[i + 1].value = arrCityDtl[0];
                }
            }
        }

        function fSelectCity(param) {
            var objCountry = document.getElementById("slcCountry");
            var objHotel = document.getElementById("slcHotel");
            var objHotelData = document.getElementById("hdnHotelData");
            var arrHotelData = objHotelData.value.split("|#|");

            objHotel.innerHTML = "";
            objHotel.options[0] = new Option("[select hotel]");
            objHotel.options[0].value = "";
            objHotel.options[1] = new Option("All Hotels");
            objHotel.options[1].value = "ALL";

            for (var i = 0; i < arrHotelData.length; i++) {
                var arrTemp = arrHotelData[i].split("|*|");
                if (arrTemp[0] == objCountry.value + "_" + param.value) {
                    var arrManyHotel = arrTemp[1].split("|@|");
                    for (var j = 0; j < arrManyHotel.length; j++) {
                        var arrHotelDtl = arrManyHotel[j].split("|~|");
                        objHotel.options[j + 2] = new Option(arrHotelDtl[1]);
                        objHotel.options[j + 2].value = arrHotelDtl[0];
                    }
                }
            }
        }

        function fSearch2() {
            var objCi = document.getElementById("txtCi2");
            var objCo = document.getElementById("txtCo2");
            var strMess = "";

            if (objCi.value == "") strMess += "Please enter Check-In Date \n";
            if (objCo.value == "") strMess += "Please enter Check-Out Date \n";
            if (objCi.value != "" && objCo.value != "") {
                var dteCi = objCi.value.substr(6, 4) + objCi.value.substr(0, 2) + objCi.value.substr(3, 2);
                var dteCo = objCo.value.substr(6, 4) + objCo.value.substr(0, 2) + objCo.value.substr(3, 2);
                var dteServer = new Date().getFullYear().toString() +
                                (parseFloat(new Date().getMonth() + 1) < 10 ?
                                    "0" + parseFloat(new Date().getMonth() + 1).toString() :
                                    parseInt(new Date().getMonth() + 1).toString()) +
                                (parseFloat(new Date().getDate()) < 10 ?
                                    "0" + new Date().getDate().toString() :
                                    new Date().getDate().toString());

                if (parseFloat(dteCi) < parseFloat(dteServer)) {
                    strMess += "Check-In Date should be later than or the same as " + new Date().toDateString("MMM dd, yyyy") + " \n";
                }
                else if (parseFloat(dteCi) > parseFloat(dteCo)) {
                    strMess += "Check-Out Date should be later than Check-In Date \n";
                }
            }

            if (strMess != "") {
                alert(strMess);
            }
            else {
                var strRoom = document.getElementById("txtRoom2").value;
                var strAdult = document.getElementById("txtAdult2").value;
                var strChild = document.getElementById("txtChild2").value;
                var strPromoCd = document.getElementById("txtAccessCd2").value;
                var strCi = document.getElementById("txtCi2").value;
                var strCo = document.getElementById("txtCo2").value;

                window.location = _strPath + "BE/GoIndexRates.aspx?langcd=en" + "&hotelcd=" + _strHotelCd +
                                  "&ci=" + strCi + "&co=" + strCo + "&room=" + strRoom + "&adult=" + strAdult +
                                  "&child=" + strChild + "&promocd=" + strPromoCd; 
            }
        }

