 //function	: setFocus()  objective	: To set focus on any required field
	function setFocus(aField) {
		document.forms[0][aField].focus();
	}
		
//function	: isEmpty()
//objective	: To check a particular field whether filled or not.
		
		function isEmpty(aTextField) {
		if ((document.forms[0][aTextField].value.length==0) || (document.forms[0][aTextField].value==null)) {
			return true;
		}
		else { 
			return false; 
		}
	}
//function	: fnValidate()
//objective	: To check all the form fields whether they were filled or not.
//			 	  If the field is empty set focus on the field.	

function fnValidate(){
	// checks for Username
		if (isEmpty("techLogin_Username")) {
			alert("Please enter the 'Username'");
			setFocus("techLogin_Username");
			document.formTechSeries_login.techLogin_Username.select();
		return false;
		}
	//checks for Password
		 if (isEmpty("techLogin_Password")) {
			alert("Please enter the 'Password'");
			setFocus("techLogin_Password");
			document.formTechSeries_login.techLogin_Password.select();
		return false;
		}
		return true;
}
