function sub_form() { error_msg = ""; destination = document.getElementById("hd").value; hn = document.getElementById("hname").value; if(destination=="" && hn=="") { error_msg += "
  • Please Specify a Destination or a Hotel name
  • ";} if(destination.length < 3 && hn=="") { error_msg += "
  • The Destination must have at least 3 characters
  • ";} if(error_msg!="") { open_error_win(error_msg); return false;} else return true; }