/*
*****************************************************************************************************
mask functions - numeric and alphanumeric

notes:

*****************************************************************************************************
*/

//browser detection
	var strUserAgent = navigator.userAgent.toLowerCase(); 
	var isIE = strUserAgent.indexOf("msie") > -1; 
	var isNS6 = strUserAgent.indexOf("netscape6") > -1; 
	var isNS4 = !isIE && !isNS6  && parseFloat(navigator.appVersion) < 5; 

//regular expressions
	var reValidChars = /[\d]/;
	var reValidChars1 = /[\d\w]/;
	var reKeyboardChars = /[\x00\x08\x0D]/;
	
//numeric mask function
	function CardNumber(objEvent) {
		var iKeyCode, strKey;  
				
		if (isIE) {
		    iKeyCode = objEvent.keyCode;
		} else {
		    iKeyCode = objEvent.which;
		}
				
		strKey = String.fromCharCode(iKeyCode);
		
		if (!reValidChars.test(strKey) && !reKeyboardChars.test(strKey)) {
			return false;
		}
	}
//alphanumeric mask function
	function CheckID(objEvent) {
		var iKeyCode, strKey;  
				
		if (isIE) {
		    iKeyCode = objEvent.keyCode;
		} else {
		    iKeyCode = objEvent.which;
		}
				
		strKey = String.fromCharCode(iKeyCode);
		
		if (!reValidChars1.test(strKey) && !reKeyboardChars.test(strKey)) {
			return false;
		}
	}
