/*
This function checks the elements in the form, if the element is a select list, it checks for the value of the selected option. If the element is a textbox, it checks for the value. If the element type is submit or hidden, it skips that element. If it finds any value in the list of elements of the form, returns true else returns false

Input Parameter: Name of the form
*/

function validateSearchForm(form) {
  var length=form.elements.length;
  for (var i=0; i < length; i++) {
    if ((form.elements[i].type!="hidden") && (form.elements[i].type!="submit")) {
      if (form.elements[i].type=="select-one") {
        if (form.elements[i].options[form.elements[i].selectedIndex].value!="") {
          return true;
        }
      } else {
        if (form.elements[i].value!="") {
          return true;
        }
      }
    }   
  }
  alert ("You should enter text in the text box to search or select an options from the select box.");
  return false;
}  	
