function Validator(){
};

Validator.prototype={
	/**
	*This function can be attached any input text box to accept 0-9 with moving keys.
	* ex: <input type="text" onkeyPress="new Validator().isNumber(event);">
	*/

	isNumber : function(evt){
		var charCode = (evt.which) ? evt.which : evt.keyCode;
		if(charCode == 8 )
			return true;
		if (charCode < 33 || charCode > 57 )
			return false;
		return true;
	},
	
	isValidEmail :function(str){
	/**
	Params   : String
	Logic	  : If string contains email id like (kk@kk.kk) format then it will return true. Else it will return false.
	*/
		var reg =/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
		return reg.test(str);
	}
	
};

