function pCase(s){ // Converts name to proper case
	var sr = "", it = s.length, ucn = false;
	if(it==0)return"";
	sr += s.charAt(0).toUpperCase();
	for(var i=1;i<it;i++){
		sr += (ucn)?s.charAt(i).toUpperCase():s.charAt(i).toLowerCase();
		var ic = s.charCodeAt(i);
		ucn = (ic == 32 || ic == 45 || ic == 46 || ic == 39);
		if(ic == 99 || ic == 67){ucn = (s.charCodeAt(i-1)==77 || s.charCodeAt(i-1)==109);}
	}
	return sr;
}
function isEmail(email){ // Checks valid email
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null ){
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) return false;
    }
    if(splitted[2] != null){
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null){
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) return false;
      }// if
      return true;
    }
return false;
}
function isFullName(s){ // Checks Full Name
	//alert(s.match("[^A-Za-z\\s'-]"));
	return (s.match("[^A-Za-z\\s'-]") == null)
}