﻿function isPhoneNumber(e)
{
	var unicode= e.charCode? e.charCode : e.keyCode;
    
    event.cancelBubble = true; //this fixes a problem with the asp:Panel DefaultButton
    
	//if the key isn't the backspace or tab key (which we should allow)
	if (unicode!=8 && unicode!=9)
	{ 
		if (unicode<48 || unicode>57) //if not a number
			return false; //disable key press
	}
}

function isNumericChar(e)
{
	var unicode= e.charCode? e.charCode : e.keyCode;
    
    event.cancelBubble = true; //this fixes a problem with the asp:Panel DefaultButton
    
	//if the key isn't the backspace or tab key (which we should allow)
	if (unicode!=8 && unicode!=9)
	{ 
		if (unicode<48 || unicode>57) //if not a number
			return false; //disable key press
	}
}