function validate()
{
			if(document.form1.name.value=="")
			{
				alert("Please enter your name !!!");
				document.form1.name.focus();
				return false;
			}
		//-------------------------------------------------
			if(document.form1.email.value=="")
			{
				alert("Please enter your email address !!!");
				document.form1.email.focus();
				return false;
			}
			if (!checkemail1(document.form1.email.value))
			{ 
				alert(document.form1.email.value + " is not a valid Email ID");
				document.form1.email.focus();	 
				return false;	
			}
			function checkemail1(emailadd)
			{	
			var result = false;
			var theStr = new String(emailadd);
			var index = theStr.indexOf("@");
			if (index > 0)
				{
					var pindex = theStr.indexOf(".",index);
					if ((pindex > index+1) && (theStr.length > pindex+2))
					result = true;
				}
			
			return result;
			}
		//-------------------------------------------------
			if (document.form1.tel.value == "")
			{
			alert("Please enter a value for the \"Contact number\" field.");
			document.form1.tel.focus();
			return (false);
			}
			
			// only allow numbers to be entered
			var checkOK = "0123456789";
			var checkStr = document.form1.tel.value;
			var allValid = true;
			var allNum = "";
			for (i = 0;  i < checkStr.length;  i++)
			{
				ch = checkStr.charAt(i);
				for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				break;
				if (j == checkOK.length)
			{
			allValid = false;
			break;
			}
				if (ch != ",")
				allNum += ch;
			}
			if (!allValid)
			{
				alert("Please enter only digit characters in the \"Contact Number\" field.");
				document.form1.tel.focus();
				return (false);
			}	
		//-------------------------------------------------
			if(document.form1.widthroom.value=="")
			{
			alert("Please enter your Width of room !!!");
			document.form1.widthroom.focus();
			return false;
			}
			if(document.form1.lengthroom.value=="")
			{
			alert("Please enter your Length of room !!!");
			document.form1.lengthroom.focus();
			return false;
			}
			if(document.form1.hightroom.value=="")
			{
			alert("Please enter your Height of room !!!");
			document.form1.hightroom.focus();
			return false;
			}

}