		function validate()
		{
			if(document.form.Name.value=="")
				{
					alert("Please enter your Name !!!");
					document.form.Name.focus();
					return false;
				}
				
				//--------------------------------contact no validator		
			if (document.form.Phone.value == "")
				  {
					alert("Please enter Phone Number !!!");
					document.form.Phone.focus();
					return (false);
				  }
				
				  // only allow numbers to be entered
				  var checkOK = "0123456789";
				  var checkStr = document.form.Phone.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 in Phone Number !!!");
					document.form.Phone.focus();
					return (false);
				  }	
				if(document.form.Position.value=="")
				{
					alert("Please enter your Position !!!");
					document.form.Position.focus();
					return false;
				}
				if(document.form.Company.value=="")
				{
					alert("Please enter your Company !!!");
					document.form.Company.focus();
					return false;
				}
			if(document.form.email.value=="")
				{
					alert("Please enter Email !!!");
					document.form.email.focus();
					return false;
				}
			if (!checkemail1(document.form.email.value))
				{ 
						alert(document.form.email.value + " is not a valid Email !!!");
						document.form.email.focus();	 
						return false;	
				}
				if(document.form.Address1.value=="")
				{
					alert("Please enter Address !!!");
					document.form.Address1.focus();
					return false;
				}
				if(document.form.Summary.value=="")
				{
					alert("Please enter Summary of Requirements !!!");
					document.form.Summary.focus();
					return false;
				}
			if(document.form.code.value=="")
				{
					alert("Please enter verification code !!!");
					document.form.code.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;
			}
		}
		
		function showother(valchk)
		{
			if(document.getElementById('othertext').style.display == 'none')
				document.getElementById('othertext').style.display = '';
			else
				document.getElementById('othertext').style.display = 'none';
		}
		