

 function updateiframeMPI(pid){
 	if(fieldAlert == 1){
 		alert ("Please specify the following (use SmartSearch tool on left):\n - Traveling Dates (From/To) \n - Sleeps (Maximum Occupancy)");
    	return false;
 	}else{
 		var iframeUrl = "/web/common/MultiplePrivateInquirySession.cgi?pid=" + pid;
        iframeMltPrvtInqr.location.href  = iframeUrl;
        return true;
 	}
 
          
}



 function allowMPI(pid){
            
            var the_form = document.getElementById('prptDtlsForm');
            for (i = 0; i < the_form.elements.length; i++) {
                    var the_element = the_form.elements[i];
                    if(the_element.type == 'checkbox' && the_element.checked == true) {
                            bandera = true;
                    }
            }
            if (bandera == false){
                var iframeUrl = "/web/traveler/publicInquiry.cgi?lid=" + jlid;
                document.location.href  = iframeUrl;
                return bandera;
            } else {
                var mpi = "http://rentalo.com/web/traveler/mpi.cgi?lid=" + jlid;
                document.location.href  = mpi;
                return bandera;
            }
        }
        
        function validateDatesFilter() {
            var inquiryArr = document.getElementById("InquiryArrival");
            var inquiryDepar = document.getElementById("InquiryDeparture");
            //alert(inquiryArr.value +", "+inquiryDepar.value );
            if (inquiryArr.value != "mm/dd/yyyy" && inquiryDepar.value != "mm/dd/yyyy"){
                var doAction = validateBasicSearchForm();
                if (doAction == true){
                    // OJO! a esto hay q ponerle el verdadero URL
                    document.form_rs.submit();
                }
            }
        }
        function submitForm(lid){
            var Url = "/web/common/newLocationPage.cgi?lid=" + lid;
            document.location.href  = Url;
        }
        function addTextDD(text){
            document.getElementById('dropDFatherDIV').innerHTML=text;
        }
        
        
  //budget      
        function validateBasicSearchFormLocal() {
            var inquiryArr = document.getElementById("InquiryArrival");
            var inquiryDepar = document.getElementById("InquiryDeparture");
            //alert(inquiryArr.value +", "+inquiryDepar.value );
            if (inquiryArr.value != "mm/dd/yyyy" && inquiryDepar.value != "mm/dd/yyyy"){
                return validateDatesFilter();
            }
        }