var Validate = {
	hasVal : function(field) {
		if(field)
			return true;
		return false;
		
	},
	email : function(email) {
		if(this.hasVal(email)) {
			if (email.match(/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)) 
				return true;
			return false;
		}
		return false;
	},
	zipcode : function(zip) {
		if(this.hasVal(zip)) {
			if (zip.length >= 5)
				return true;
			return false;
		} 
		return false;
	},
	isDigit : function(val) {
		if(this.hasVal(val)) {
			if (val.match(/^\d+$/))
				return true;
			return false;
		}
		return false;
	},
	isLength : function(val, str_length) {
		if(this.hasVal(val) && str_length) {
			if(val.length == str_length)
					return true;
			return false;
		}
		return false;
	}
}