function jsCheckAlphaNumericOnly(e, oObject){
	var strText = null;
	
	if( window.event )
	{
		if( window.event && window.event.keyCode == 13 ){
			return true;
		}
	}
	else
	{
		if( e.which == 13 )
		{
			return true;
		}
	}
	
	
	if( window.event )
	{
		if((window.event != null) && (window.event.type != null) && (window.event.type == "keypress")){
			strText = String.fromCharCode(window.event.keyCode);
		}else if((window.event != null) && (window.event.type != null) && (window.event.type == "paste")){		
			strText = window.clipboardData.getData("Text");
	   	}else{
			if(typeof oObject == 'object'){
	   			if( (oObject != null) && (oObject.value != null)){
	   				strText = oObject.value;
	   			}
			}else if(typeof oObject == 'string'){
				strText = oObject;
			}
		}
	}
	else
	{	
		if( e.ctrlKey && (e.which == e.DOM_VK_V || e.which == 118) && e.type != "keyup" ) //work around for paste
		{
			strText = getDataFromClipboardInFirefox(); //get the data from the clipboard
		}
		else //keypress
		{			
			key = e.which;
			
			strText = String.fromCharCode( key );

			if( ( e.keyCode >= 35 && e.keyCode <= 46 ) || (e.keyCode >= 8 && e.keyCode <= 17 )   )
			{				
				return true;
			}
		}		
	}
	
	if(typeof strText == 'string'){
		if(strText != null){
			var strAlphaNumericCharacters = "0123456789abcdefcghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZñÑ!@#$^&*()-=+;:<>?/\~|.[]{}";
			for(index = 0; index < strText.length; index++){
				if(strAlphaNumericCharacters.indexOf(strText.charAt(index))==-1){
					return false;
				}
			}
			return true;		
		}else{
			return true;
		}
	}else{
		return false;
	}
}
