function R1OProcessPost() {
        //var form1 = document.getElementById('R1OForm');
        var form1 = document.forms['R1OForm'];
        if (!form1) {
            form1 = document.R1OForm;
        }

        if (form1 != null) {
            form1.propertyIDs.value = '';
            form1.LocationAmenities.value = '';

            //Locations
            if (!form1.cbProp1.checked) {
                if (form1.cbProp2.checked) {
                    form1.LocationAmenities.value += '14-';
                }
                if (form1.cbProp3.checked) {
                    form1.LocationAmenities.value += '269-';
                }
                if (form1.cbProp4.checked) {
                    form1.LocationAmenities.value += '557-';
                }
                if (form1.cbProp5.checked) {
                    form1.LocationAmenities.value += '67-';
                }
                if (form1.cbProp6.checked)
                {
                    form1.LocationAmenities.value += '315-';
                }
            }

            //Remove last hyphen for location amenities
            if (form1.LocationAmenities.value.length > 1) {
                form1.LocationAmenities.value = form1.LocationAmenities.value.substring(0, form1.LocationAmenities.value.length - 1);
            }

            //Sleeps
            form1.SleepsList.value = '';
            if (!form1.cbSleepsAll.checked) {
                if (form1.cbSleeps14.checked) {
                    form1.SleepsList.value += '1-2-3-4-';
                }
                if (form1.cbSleeps57.checked) {
                    form1.SleepsList.value += '5-6-7-';
                }
                if (form1.cbSleeps810.checked) {
                    form1.SleepsList.value += '8-9-10-';
                }
                if (form1.cbSleeps11.checked) {
                    form1.SleepsList.value += '11-12-13-14-15-16-17-18-19-20-21-22-23-24-25-26-27-28-29-30-';
                }
            }

            //Remove last hyphen for # of sleeps
            if (form1.SleepsList.value.length > 1) {
                form1.SleepsList.value = form1.SleepsList.value.substring(0, form1.SleepsList.value.length - 1);
            }

            //Set Availability Fields
            if (form1.rbExactDates.checked)
            {
                form1.isExact.value = '1';
                form1.isFlexible.value = '';
            }
            else
            { //Flexible Dates
                form1.isExact.value = '';
                form1.isFlexible.value = '1';
            }
        }

        saveSearchValues();
    }

    function setDates() {
        //lblStartDate, lblEndDate, divDates, pFlexibleNumDays
        //rbAllDates, rbExactDates, rbFlexibleDates
        var form1 = document.forms['R1OForm'];
        if (!form1) {
            form1 = document.R1OForm;
        }
        if (form1 != null) {
            if (form1.rbExactDates.checked) {
                document.getElementById('lblStartDate').innerHTML = 'Check-in:';
                document.getElementById('lblEndDate').innerHTML = 'Check-out:';
                document.getElementById('divDates').style.display = 'block';
                document.getElementById('pFlexibleNumDays').style.display = 'none';
            }
            else { //Flexible Dates
                document.getElementById('lblStartDate').innerHTML = 'Start Range:';
                document.getElementById('lblEndDate').innerHTML = 'End Range:';
                document.getElementById('divDates').style.display = 'block';
                document.getElementById('pFlexibleNumDays').style.display = 'block';
            }
        }
    }

    function saveSearchValues() {
        var form1 = document.forms['R1OForm'];
        if (!form1) {
            form1 = document.R1OForm;
        }
        if (form1 != null) {
            //deleteCookie('R1OcbProp1');
            //deleteCookie('R1OcbProp2');
            //deleteCookie('R1OcbProp3');
            //deleteCookie('R1OcbProp4');
            
            document.cookie = 'R1OcbProp1=' + form1.cbProp1.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbProp2=' + form1.cbProp2.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbProp3=' + form1.cbProp3.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbProp4=' + form1.cbProp4.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbProp5=' + form1.cbProp5.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbProp6=' + form1.cbProp6.checked + '; path=/; domain=.wplbo.com;';

            document.cookie = 'R1OcbSleepsAll=' + form1.cbSleepsAll.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbSleeps14=' + form1.cbSleeps14.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbSleeps57=' + form1.cbSleeps57.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbSleeps810=' + form1.cbSleeps810.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OcbSleeps11=' + form1.cbSleeps11.checked + '; path=/; domain=.wplbo.com;';

            document.cookie = 'R1OrbExactDates=' + form1.rbExactDates.checked + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OrbFlexibleDates=' + form1.rbFlexibleDates.checked + '; path=/; domain=.wplbo.com;';

            document.cookie = 'R1OStart=' + form1.Start.value + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1OEnd=' + form1.End.value + '; path=/; domain=.wplbo.com;';
            document.cookie = 'R1ONumNights=' + form1.NumNights.value + '; path=/; domain=.wplbo.com;';
        }
    }

    function initializeSearchForm()
    {
        var form1 = document.forms['R1OForm'];
        if (!form1) {
            form1 = document.R1OForm;
        }
        if (form1 != null) {
            var temp = getCookie('R1OcbProp1');
            if (temp != null) { form1.cbProp1.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbProp2');
            if (temp != null) { form1.cbProp2.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbProp3');
            if (temp != null) { form1.cbProp3.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbProp4');
            if (temp != null) { form1.cbProp4.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbProp5');
            if (temp != null) { form1.cbProp5.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbProp6');
            if (temp != null) { form1.cbProp6.checked = temp.toString() == 'true'; }

            temp = getCookie('R1OcbSleepsAll');
            if (temp != null) { form1.cbSleepsAll.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbSleeps14');
            if (temp != null) { form1.cbSleeps14.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbSleeps57');
            if (temp != null) { form1.cbSleeps57.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbSleeps810');
            if (temp != null) { form1.cbSleeps810.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OcbSleeps11');
            if (temp != null) { form1.cbSleeps11.checked = temp.toString() == 'true'; }

            temp = getCookie('R1OrbExactDates');
            if (temp != null) { form1.rbExactDates.checked = temp.toString() == 'true'; }
            temp = getCookie('R1OrbFlexibleDates');
            if (temp != null) { form1.rbFlexibleDates.checked = temp.toString() == 'true'; }

            //temp = getCookie('R1OStart');
            //if (temp != null) { form1.Start.value = temp.toString(); }
            //temp = getCookie('R1OEnd');
            //if (temp != null) { form1.End.value = temp.toString(); }
            temp = getCookie('R1ONumNights');
            if (temp != null) { form1.NumNights.value = temp.toString(); }
        }

        setDates();
    }

    function getCookie(cookieName) {
        var results = document.cookie.match('(^|;) ?' + cookieName + '=([^;]*)(;|$)');
        if (results)
            return (unescape(results[2]));
        else
            return null;
    }

    function deleteCookie(cookieName) {
        var cookieDate = new Date();  // current date & time
        cookieDate.setTime(cookieDate.getTime() - 1);
        document.cookie = cookieName += "=; expires=" + cookieDate.toGMTString() + "; domain=.wplbo.com;";
    }
