// Check whether string s is empty.
function isEmpty(s){
	return ((s == null) || (s.length == 0))
}

//checks for invalid characters
function isProper(string) {

   if (!string) return false;
   var iChars = "\"";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}

function isPhoneNumValid(string) {
    if (string.search(/[1-9]\d{6}/) != -1)
		{
		return true;
		}
    else
		{
        return false;
        }
} 

function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}
