﻿var passFocus=false;
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function numbersonly(e){
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8 && unicode!=13){ //if the key isn't the backspace key (which we should allow)
		if (unicode<48||unicode>57) //if not a number
			return false //disable key press
	}
	//if (unicode==13 && passFocus=='true'){
	//	CheckPassUser()
	//}
}
function IsFieldNumbersOnly(CheckNum){
	var x=CheckNum
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (anum.test(x))
		testresult=true
	else{
		testresult=false
		}
	return (testresult)
}