// JScript source code
function validate()
{
			var illegalChars = /\W/;
			var illegalChars1 = /\W/;
			if (document.getElementById('user').value=="" || document.getElementById('user').value==null)
				{
				window.alert("Please enter the username");
				document.getElementById('user').focus();
				return false
				} 
				
			if (illegalChars.test(document.getElementById('user').value)) 
				{
				window.alert("Invalid Username or Password");
				document.getElementById('user').focus();
				return false;
				} 
				
			if (document.getElementById('pwd').value=="" || document.getElementById('pwd').value==null)
				{
				window.alert("Please enter the password");
				document.getElementById('pwd').focus();
				return false
				} 
			
				str=document.getElementById('user').value;
				str=str.toUpperCase();
				
				if(str=="ALTER" || str=="DROP" || str=="DELETE" || str=="TRUNCATE" || str=="MODIFY" ||str=="SP_HELP" ||str=="SP_") 
				{
					window.alert("Invalid Username or Password");
					document.getElementById('user').focus();
					return false;
				}
				str=document.getElementById('pwd').value;
				str=str.toUpperCase();
				
				if(str=="ALTER" || str=="DROP" || str=="DELETE" || str=="TRUNCATE" || str=="MODIFY" ||str=="SP_HELP" ||str=="SP_") 
				{
					window.alert("Invalid Username or Password");
					document.getElementById('pwd').value="";
					document.getElementById('pwd').focus();
					return false;
				}
				
				if (illegalChars1.test(document.form1.pwd.value)) 
				{
				window.alert("Invalid Username or Password");
				document.getElementById('pwd').value="";
				document.getElementById('pwd').focus();
				return false;
				} 	

		}