function IsEnter()
{
 var whichKey = event.keyCode; 
 if (whichKey==13)
  return(true);
 else 
  return(false);
}

function masknum(obj,e,lcard){
		var key = '';
		var i = j = 0;
		var len = 0;
		var strCheck = '-0123456789';
		var aux ='';
		var whichCode = (window.Event) ? e.which : e.keyCode;
		if (whichCode == 13) return true;  // Enter
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
		if (strCheck.indexOf(key) == -1){ 		
			return false; 
		}
		len = obj.value.length;
		if (len > lcard) return false;
		
 return true;
}
function masknum3(obj,e,lcard){
		var key = '';
		var i = j = 0;
		var len = 0;
		var strCheck = ',0123456789';
		var aux ='';
		var whichCode = (window.Event) ? e.which : e.keyCode;
		if (whichCode == 13) return true;  // Enter
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
		if (strCheck.indexOf(key) == -1){ 		
			return false; 
		}
		len = obj.value.length;
		if (len > lcard) return false;
		
 return true;
}
function masknum4(obj,e,lcard){
		var key = '';
		var i = j = 0;
		var len = 0;
		var strCheck = '0123456789';
		var aux ='';
		var whichCode = (window.Event) ? e.which : e.keyCode;
		if (whichCode == 13) return true;  // Enter
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
		if (strCheck.indexOf(key) == -1){ 		
			return false; 
		}
		len = obj.value.length;
		if (len > lcard) return false;
		
 return true;
}

function masknum2(obj,e,lcard){
		var key = '';
		var i = j = 0;
		var len = 0;
		var strCheck = '.0123456789';
		var aux ='';
		var whichCode = (window.Event) ? e.which : e.keyCode;
		if (whichCode == 13) return true;  // Enter
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
		if (strCheck.indexOf(key) == -1){ 		
			return false;  // Las teclas no validas
		}
		len = obj.value.length;
		if (len > lcard) return false;
 return true;
}

function sololetras(obj,e ,lcard ,siespacio ,sinumeros ,otroschar) {
   var strCheck = otroschar+"ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdfeghijklmnñopqrstuvwxyz";
   
   if (siespacio==1) strCheck = strCheck + " ";

   if (sinumeros==1) strCheck = strCheck + "0123456789";


   var key = '';
   var i = j = 0;
   var len = 0;
   var aux ='';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	if (whichCode == 13) return true;  // Enter
	key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
	if (strCheck.indexOf(key) == -1) return false;  // Las teclas no validas
	len = obj.value.length;
	if (len > lcard) return false;
 return true;
}

function sincoma(obj,e ,lcard ,siespacio ,sinumeros ,otroschar) {
   var strCheck =",";
   
   var key = '';
   var i = j = 0;
   var len = 0;
   var aux ='';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	if (whichCode == 13) return true;  // Enter
	key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado
	
	if (strCheck.indexOf(key) == -1) return true;  // Las teclas no validas
	if (strCheck.indexOf(key) > -1) return false;  // Las teclas no validas, si esta
	len = obj.value.length;
	if (len > lcard) return false;
 return true;
}







