/* Validator Object Prototype */
function Validator(obj, usrName, dataType, regExpObj, regScope)
	{
	if(isNav4 || isIE4 || isIE5)
		{
		this.elem = obj
		this.usrName = usrName
		this.dType = (dataType) ? dataType: null
		this.regExpObj = (regExpObj) ? regExpObj: ""
		this.regScope = regScope
		}
	}
	
function mValid()
	{
		var objValue = this.elem.value
		var binValid = true
		if (!(objValue==null || objValue==""))
			{
			if (this.dType!=null)
				{
				switch(this.dType)
					{
					case "Num":
						binValid = !isNaN(objValue)
						break
					case "Alpha":
						binValid = isNaN(objValue)
						break
					case "EMail":
						var valReg = new RegExp("^[a-z\\.]+@[a-z\\.]+$")
						binValid = valReg.test(objValue)
						break
					case "Date":
						var valReg = new RegExp("^[01]\\d\\W[0123]\\d\\W\\d{4}$")
						binValid = valReg.test(objValue)
						break	
					}
				}
			}
		if(this.regExpObj)
			{
			var valReg = new RegExp(this.regExpObj, this.regScope)
			binValid = valReg.test(objValue)
			}
		if (!binValid)
			{
				alert(this.usrName + " contains incorrect data."
					+ "\nPlease enter the indicated type.")
				this.elem.focus()		
			}
	}
Validator.prototype.validate = mValid