/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function validateSearchForm(){
    var x=document.forms["searchform"]["arrival_date"].value;
    
            if (x==null || x==""){
                alert("Arrival date must filled out");
                document.getElementById("arrival_date").focus();
                return false;
              }
         var nightst =   document.forms["searchform"]["nights_staying"].value ;
            if (nightst==null || nightst==""){
                alert("Night staying must filled out");
                document.getElementById("nights_staying").focus();
                return false;
              }
                if (isNaN(nightst)) {
                    alert("Night staying must be an integer");
                    return false;
                  }


         var guestno =   document.forms["searchform"]["no_of_guests"].value ;
            if (guestno==null || guestno==""){
                alert("Number of guest must filled out");
                document.getElementById("no_of_guests").focus();
                return false;
              }
                if (isNaN(guestno)) {
                    alert("Number of guest must be an integer");
                    return false;
                  }

return true;


}


