$(document).ready(function(){
	$('.quantity').keypress(function(e) {
        var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});
	
	$('.qty').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	$('.price').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	
	$('.tax').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	
	// vender creation 
	
	/*$(".vender_name").keypress(function(e) {
		if((e.which < 97 /* a  || e.which > 122 /* z ) && (e.which < 65 /* A  || e.which > 90 /* Z )) {
		//	e.preventDefault();
		//}
//	});*/
	
	$('.contact_no').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 48; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	
	
	// Product Creation 
	
	// vender creation 
	
	/*$(".product_name").keypress(function(e) {
		if((e.which < 97  || e.which > 122 ) && (e.which < 65  || e.which > 90 )) {
			e.preventDefault();
		}
	});*/
	
	
	$(".unit_of").keypress(function(e) {
		if((e.which < 97 /* a */ || e.which > 122 /* z */) && (e.which < 65 /* A */ || e.which > 90 /* Z */)) {
			e.preventDefault();
		}
	});
	
	$('.product_price').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	
	$('.product_cstock').keypress(function(e) {
		var a = [];
        var k = e.which;
		
        for (i = 46; i < 58; i++)
		a.push(i);
		
        if (!($.inArray(k,a)>=0))
		e.preventDefault();
	});	
	
   $('.pname').keypress(function(e) {
		if ((e.which > 32 && e.which < 45) || (e.which > 57 && e.which < 65) || 
		(e.which > 91 && e.which < 93) || e.which > 122) {
			e.preventDefault();
  }	
});

});