
function Validator()
{

	
	this.isValidEmail=function(str) 
	{
		var domains = /(\.co\.uk)|\.{1}(com|info|net|org|gov|mil|asn)(\.{1}[az]{2}|)/g;
		if (str.indexOf( "@" ) ==-1 || str.search(domains)==-1) 
		{
			return false; //Must have an @ symbol
		} 
		else 
		{
			return true;
		}
	}
	
	this.isBlank=function(str)
	{
		if(str.length==0)
		{
			return true;
		}
		else
		{
			return false;	
		}
	}
	
	this.fieldsMatch=function(a,b)
	{
		if(a!=b)
		{
			return false;	
		}
		else
		{
			return true;
		}
	}
	
	this.isInteger=function(str)
	{
		 if( parseFloat(str) % 1 !=0 )
		 {
			return false 
		 }
		 else
		 {
			return true; 
		 }
	}
	
	
	
	
}//end class Validator

