// Allows Alphabets,Space,Dot
function isAlpha(evt)
{      
	var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode == 32 || (charCode == 46) || (charCode >= 65 && charCode <= 90)||(charCode>=97 && charCode<=122))
        	return true;
        return false;
}

// Allows Numbers,Alphabets and all special characters other than single Quotes
function isAlphaNumeric_spl(evt) 
{
	var charCode = (evt.which) ? evt.which : event.keyCode	
	if((charCode>=65 && charCode<=90) || (charCode>=97 && charCode<=122) || (charCode>=40 && charCode<=64) || (charCode>=32 && charCode<=38) || (charCode==92) || (charCode==94) || (charCode==95) || (charCode==124) )
		return true;
	return false;
}

// Allows Numbers,Plus,Hyphen,Space,Comma
function isPhone(evt)
{
    var charCode = (evt.which) ? evt.which : event.keyCode
    if ((charCode==32) || (charCode==44) || (charCode==43) || (charCode==45))
        return true;
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;
}

// Allows Numbers
function isNumeric(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
        	return false;
        return true;                   
}

// Allows Alphabets,Numbers,Space,Dot,Hyphen,Underscore
function isAlphaNumeric_code(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode       
        if((charCode>=65 && charCode<=90) || (charCode>=97 && charCode<=122) || (charCode>=48 && charCode<=57) || (charCode==45) || (charCode==95) || (charCode==32) || (charCode==46) || (charCode==38))
            return true;
        return false;               
}
 
// Allows Alphabets,Numbers,@,Dot,Hyphen,Underscore
function isEmailID(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode       
        if((charCode>=65 && charCode<=90) || (charCode>=97 && charCode<=122) || (charCode>=48 && charCode<=57)||(charCode==45)||(charCode==95)||(charCode==64)||(charCode==46))
        	return true;
        return false;       
}
  
// Allows Numbers,Backslash,Hyphen,Colon,Space
function isDate(evt)
{
    //65=A; 80=P; 77=M;
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode==65 || charCode==77 || charCode==80)
        {
            charCode = charCode + 32; // to make it lower case;
            event.keyCode = charCode;
        }
	if((charCode==45) || (charCode==47) || (charCode==58) || (charCode==32) || (charCode==97) || (charCode==109) || (charCode==112))
	    return true;
	if (charCode > 31 && (charCode < 48 || charCode > 57))
	    return false;
	return true;
}

// Allows Numbers,Dot
function isFloat(evt,val)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
	if(charCode==46 && val.indexOf('.')==-1)
		return true;
	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;       
	return true;
}

//Allows Alphabets,Numbers,Dots,Undescore,Hyphen,BackSlash,Colon.
function isAlphaNumeric_url(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode       
        if((charCode>=65 && charCode<=90) || (charCode>=97 && charCode<=122) || (charCode>=48 && charCode<=57) || (charCode==46) || (charCode==58) || (charCode==47) || (charCode==45) || (charCode==95))
            return true;
        return false;               
}

// Allows Numbers and Dots.
function isNumeric_ip(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode       
        if((charCode>=48 && charCode<=57) || (charCode==46))
            return true;
        return false;                  
}