function validateEmail(form) {


   if  (form.txt_param1.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.txt_param1.focus();
      return false;
  }
  if  (form.txt_param2.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.roomcat_id.focus();
      return false;
  }
  if  (form.txt_param4.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.txt_param4.focus();
      return false;
  }
  if  (form.txt1_param4.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.txt1_param4.focus();
      return false;
  }
  if  (form.txt_param5.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.txt_param5.focus();
      return false;
  }
    if  (form.txt_param6.value == "")   
  {
      alert("Blank Values are not Allowed Here");
      form.txt_param6.focus();
      return false;
  }
  if  (form.txt_param7.value == "")  
  {
      alert("Blank Values are not Allowed Here");
      form.txt_param7.focus();
      return false;
  }  

  if  (form.noOfNights.value == 0)  
  {
      alert("You Might Book Atleast One Night");
      form.txt_param4.focus();
      return false;
  } 
  if  (form.noOfNights.value == 'NaN')  
  {
      alert("Please use the given date format");
	  document.HotSrch.noOfNights.value = "";
      form.txt_param4.focus();
      return false;
  }  
  

fromdatesplit = document.HotSrch.txt_param4.value;
enddatesplit = document.HotSrch.txt1_param4.value;


var m_fromDate = fromdatesplit.split("-");
var m_day = m_fromDate[0];
var m_mon = m_fromDate[1].toLowerCase();
var m_year = m_fromDate[2];


var m_endDate = enddatesplit.split("-");
var m_daye = m_endDate[0];
var m_mone = m_endDate[1].toLowerCase();
var m_yeare = m_endDate[2];

// For Arrival Date............................................

if ((m_mon == 'jan') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'feb') && (m_day > 28))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'mar') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'apr') && (m_day > 30))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'may') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'jun') && (m_day > 30))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'jul') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'aug') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'sep') && (m_day > 30))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'oct') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'nov') && (m_day > 30))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

if ((m_mon == 'dec') && (m_day > 31))
{
alert("Invalid day in the Month");
form.txt_param4.focus();
return false;
}

// For Departure Date............................................

if ((m_mone == 'jan') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'feb') && (m_daye > 28))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'mar') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'apr') && (m_daye > 30))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'may') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'jun') && (m_daye > 30))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'jul') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'aug') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'sep') && (m_daye > 30))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'oct') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'nov') && (m_daye > 30))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}

if ((m_mone == 'dec') && (m_daye > 31))
{
alert("Invalid day in the Month");
form.txt1_param4.focus();
return false;
}


		if (form.noOfNights.value > 14)
			{

				answerForNights = confirm("You have searched for more than 14 nights. Please click OK and give your requirements. Our CRO staff will contact you shortly.!\n\nThank you !!");
				if (answerForNights == 1)
				{
					return true;				}
				else
				{
					return false;
				}
			}
}

function selectitem()
{
  var one;
  {
  one = document.HotSrch.roomcat_id.value;
  document.HotSrch.txt_param2.value = one;
  document.HotSrch.roomcat_id.focus();
  }
}

function selectitem3()
{
  var one,two,three;
  {
  one = document.HotSrch.no_persons.value;
  two = document.HotSrch.no_childs.value;
  three = document.HotSrch.no_rooms.value;
  document.HotSrch.txt_param5.value = one; 
  document.HotSrch.txt_param6.value = two; 
  document.HotSrch.txt_param7.value = three; 
  }
}


<!--new scripts -->

<!-- dd menu -->

<!--
var timeout         = 500;
var closetimer		= 0;
var ddmenuitem      = 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 
// -->

<!--new scripts -->