function isNumeric( c ){
	return ( c == '.' || c == '-' || ( c >= '0' && c <= '9') )
}
function isNumericAll( c ){
	return ( c >= '0' && c <= '9')
}
function isNumericZip( c ){
	return (c == '-' || ( c >= '0' && c <= '9') )
}
function isNumericFlash( c ){
	return ( c != '|')
}
function isText( c ){
	return !( c >= '0' && c <= '9')
}
function isPlastic( c ){
	return (c == ' ' || ( c >= '0' && c <= '9'))
}
function removeNonNumerics( s , type ){
	if ( s == null ) return null
	s = '' + s
	var tmp = ''
	var isLeadingZero = false
	var result
	for ( var i = 0; i < s.length; i++ ){
		var c = s.charAt( i )
		if ( type == 'All' ) {
			result = isNumericAll( c )
		}else if ( type == 'Zip' ) {
			if(i != '5'){
				result = isNumericAll( c )
			}else{
				result = isNumericZip( c )
			}
		}else if( type == 'Flash'){
			result = isNumericFlash( c )
		}else if( type == 'Text'){
			result = isText( c )
		}else if( type == 'Plastic'){
			result = isPlastic( c )
		}else{
			result = isNumeric( c )
		}
		if (result){
			if ( isLeadingZero == true && c == '0' ){
				continue;
			}else{
				isLeadingZero = false
			}tmp = tmp + c
		}
	}return tmp
}
