// JavaScript Document
function validate(theForm)
{
	if((theForm.nametxt.value=="Name")||(theForm.nametxt.value==""))
	{
		alert("Please fill your name");
		theForm.nametxt.focus();
		return false;
	}
	if((theForm.email.value=="Email")||(theForm.email.value==""))
	{
		alert("Please fill your email address");
		theForm.email.focus();
		return false;
	}
	if(!checkEmail(theForm))
	{
		alert("Invalid email address ! Try Again");
		theForm.email.focus();
		return false;
	}
		if((theForm.nights.value=="No of Nights")||(theForm.nights.value==""))
	{
		alert("Please enter number of nights you wants");
		theForm.nights.focus();
		return false;
	}
	if((theForm.rooms.value==""))
	{
		alert("Please select types of rooms requires");
		theForm.rooms.focus();
		return false;
	}
		return true;	
}
function checkEmail(theForm) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value)){
		return (true);
	}
	return (false);
}
/*function newvalidate(newfrm)
{
	if((newfrm.newsemailtxt.value=="E-mail")||(newfrm.newsemailtxt.value==""))
	{
		alert("Please fill your email address");
		newfrm.newsemailtxt.focus();
		return false;
	}
	if(!checkEmail(newfrm))
	{
		alert("You have entered an invalid email address ");
		newfrm.newsemailtxt.focus();
		return false;
	}
	
}
*/

