var whitespace=" \t\n\r";

function isEmpty(s) 
	{
     	return ((s==null) || (s.length==0))
   	}

function isWhitespace(s)
   	{
   	var i;
   	if (isEmpty(s)) return true;
   
   	for (i=0;i < s.length; i++)
		{
		var c=s.charAt(i);
		if (whitespace.indexOf(c)==-1) return false;
		}
	return true;
	}

function isEmail(s)
	{
	var i=1;
	var sLength=s.length;
	while (( i < sLength) && (s.charAt(i) != "@"))
	{ i++
	}
	if (( i >=sLength) || (s.charAt(i) !="@")) return false;
	else i+=2;
	
	while ((i < sLength) && (s.charAt(i) !="."))
	{ i++
	}
	if ((i >=sLength-1) || (s.charAt(i) != ".")) return false;
	else return true;
	}



	       	
