﻿function LimitChars(text,max) 
{
	var maxlength = new Number(max);
	
	//make sure the text object isnt null
 	if(text == null)
	{
		return false;
	}
	
	if (text.value.length > maxlength)
	{
		text.value = text.value.substring(0,maxlength);
		return false;
	}
	
	return true;
}

function noAlpha(evt)
{
	var e = event || evt; // for trans-browser compatibility     
	var charCode = e.which || e.keyCode;     
	if (charCode > 31 && ((charCode < 48 || charCode > 57) || charCode !=109))
	{
		return false;     
	}
	return true; 
}