

function validateForm()
{
	with (document.form1)
	{
		if (yourName.value == "")
		{
			alert("Name cannot be left blank!");
			yourName.focus();
			return false;
		}
		else if (yourEmail.value.search("@") == -1 || yourEmail.value.search("[.*]") == -1)
		{
			alert("Valid email address is required!");
			yourEmail.focus();
			return false;
		}
		
	
	var LIntCtr=0;
	var LIntSelectedCheckBoxes=0;
	while (LIntCtr < document.form1.elements.length)
	 {
		if(document.form1.elements[LIntCtr].type == 'text' || document.form1.elements[LIntCtr].type == 'password')
		 {
			var iChars = "!#$%^&*()+=[]\\\';,/{}|\":<>?";
			for (var i = 0; i < document.form1.elements[LIntCtr].value.length; i++) 
			{
				if (iChars.indexOf(document.form1.elements[LIntCtr].value.charAt(i)) != -1) 
				{
				alert ("There are special characters. \nThese are not allowed.\n Please remove them and try again.");
				document.form1.elements[LIntCtr].focus();
				document.form1.elements[LIntCtr].select();
				return false;
				}
			}
		}
		 LIntCtr++;
	}
	
	  for (var i = 0; i < yourEmail.value.length; i++) 
	  {
		if (iChars.indexOf(yourEmail.value.charAt(i)) != -1) 
		{
			alert ("Your email contains restricted characters. \nThese are not allowed.\n Please remove them and try again.");
			return false;
		}
	  }

	}
return true;		
}	
